Skip to content

Commit

Permalink
Don't overwrite user's input.
Browse files Browse the repository at this point in the history
  • Loading branch information
MIvanchev committed Apr 1, 2022
1 parent a4b148d commit 07030d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const VALIDATORS = [
var registration = null;
var queue = null;

function send(id, initiator, data) {
function send(id, initiator, data = null) {
return browser.runtime.sendMessage({
"id": id,
"initiator": initiator,
Expand Down Expand Up @@ -90,7 +90,7 @@ async function handleSet(initiator, settings) {
return;
}

await send("set-ok", initiator, settings);
await send("set-ok", initiator);
}

function validateFieldPresent(field) {
Expand Down
2 changes: 0 additions & 2 deletions settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ function notify(message) {
apply_btn.disabled = false;
break;
case "set-ok":
script_ed.value = data.script;
enabled_cb.checked = data.enabled;
setComponentsStatus(false, "Settings applied successfully.");
break;
case "set-failed":
Expand Down

0 comments on commit 07030d5

Please sign in to comment.