Bugfixes, dialog improvements
* It is now possible to pass an element as the dialog message to have it inserted as the body.
This commit is contained in:
8
json.js
8
json.js
@@ -90,7 +90,13 @@ function jsonPatch(json, path, value) {
|
||||
if (search === 'key') {
|
||||
// find key tok in ptr
|
||||
if (typeof ptr[tok] === 'undefined') {
|
||||
return json;
|
||||
if (toks.length === 0) {
|
||||
ptr[tok] = value;
|
||||
return json;
|
||||
} else {
|
||||
ptr[tok] = {};
|
||||
ptr = ptr[tok];
|
||||
}
|
||||
} else {
|
||||
if (toks.length === 0) {
|
||||
ptr[tok] = value;
|
||||
|
||||
Reference in New Issue
Block a user