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:
2025-09-21 00:45:34 +02:00
parent 6e1351d9ab
commit bd7b7ac498
7 changed files with 95 additions and 20 deletions

View File

@@ -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;