Skip to content
Snippets Groups Projects
Commit 8e4dc5e0 authored by Matthias Konitzny's avatar Matthias Konitzny :fire:
Browse files

Increased robustness of space save

parent 238a5f8d
No related branches found
No related tags found
No related merge requests found
...@@ -11,9 +11,14 @@ function ajaxCall(data) { ...@@ -11,9 +11,14 @@ function ajaxCall(data) {
body: data, body: data,
}; };
return fetch(ks_global.ajax_url, opts).then(function (response) { return fetch(ks_global.ajax_url, opts).then(
return response.json(); function (response) {
}); return response.json();
},
function (reason) {
console.log(reason);
}
);
} }
/** /**
......
...@@ -45,6 +45,7 @@ function ks_update_space() { ...@@ -45,6 +45,7 @@ function ks_update_space() {
$name = ks_escape_space_name($_POST["space"]); $name = ks_escape_space_name($_POST["space"]);
ks_insert_or_update_graph($name, $graph); ks_insert_or_update_graph($name, $graph);
echo json_encode($graph);
wp_die(); wp_die();
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment