From 2ad85778e27b0a4845e1d6bc05128cbf79abac38 Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 8 May 2021 20:26:44 +0100 Subject: [PATCH] fixed preset updating not working properly --- src/js/popups/edit-preset-popup.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/js/popups/edit-preset-popup.js b/src/js/popups/edit-preset-popup.js index 5126872ae..1b3715f38 100644 --- a/src/js/popups/edit-preset-popup.js +++ b/src/js/popups/edit-preset-popup.js @@ -105,15 +105,17 @@ function apply() { uid: firebase.auth().currentUser.uid, name: inputVal, presetid, - config: preset.config, + config: configChanges, }).then((e) => { Loader.hide(); let status = e.data.resultCode; if (status === 1) { Notifications.add("Preset updated", 1); - DB.getSnapshot().presets.filter( + let preset = DB.getSnapshot().presets.filter( (preset) => preset.id == presetid - )[0].name = inputVal; + )[0]; + preset.name = inputVal; + preset.config = configChanges; Settings.update(); } else if (status === -1) { Notifications.add("Invalid preset name", 0);