From d1283964cd28ec563d68daf87ffe4272b0374de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 15 Aug 2022 21:40:41 +0100 Subject: [PATCH] CustomCategory: bugfix, editing loaded custom categories --- src/customCategory.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/customCategory.js b/src/customCategory.js index 70b6dec1..862f5302 100644 --- a/src/customCategory.js +++ b/src/customCategory.js @@ -30,7 +30,7 @@ class CustomCategoryRepository { getCategory (id, options, callback) { if (id in this.cache) { - return callback(null, yaml.load(this.cache[id])) + return callback(null, yaml.load(this.cache[id]), this.cache[id]) } fetch('customCategory.php?id=' + id) @@ -175,8 +175,8 @@ function editCustomCategory (id, category) { const editor = new CustomCategoryEditor(repository) editor.load(id, (err) => { if (err) { return global.alert(err) } - customCategory.category = category - customCategory.edit() + editor.category = category + editor.edit() }) } }