From 1ab69ffb6f87561ee693e5b941a6e449850e22a6 Mon Sep 17 00:00:00 2001 From: wareya Date: Tue, 14 May 2019 00:10:08 -0400 Subject: [PATCH] fix error --- json_config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/json_config.js b/json_config.js index e8be00f..7188a8a 100644 --- a/json_config.js +++ b/json_config.js @@ -109,7 +109,7 @@ function edit_cancel() document.getElementById("dict_editor").className = "closed"; document.getElementById("edit_entries").value = ""; } -function edit_apply(and_then = undefined) +function edit_apply(event, and_then = undefined) { try { @@ -126,7 +126,7 @@ function edit_apply(and_then = undefined) save_dicts(); } - if(and_then) + if(and_then !== undefined) and_then(); } catch(e) @@ -136,7 +136,7 @@ function edit_apply(and_then = undefined) } function edit_okay() { - edit_apply(edit_cancel); + edit_apply(null, edit_cancel); } function or_default(val, fallback)