Skip to content

Commit

Permalink
Fix bug where active secrets were not updated correctly
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Blum <[email protected]>
  • Loading branch information
mulbc committed Jan 14, 2019
1 parent 62020ec commit 832f7b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion options.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ async function secretChanged() {
checkbox.parentElement.parentElement.parentElement.style = 'text-decoration:line-through; color: red;';
throw new Error(`ERROR accessing this field: ${await fetchListOfSecretsForDir.text()}`);
}
if (activeSecrets.indexOf(checkbox.name) > -1) {
if (activeSecrets.indexOf(checkbox.name) < 0) {
activeSecrets.push(checkbox.name);
}
await browser.storage.sync.set({ 'secrets': activeSecrets });
Expand Down

0 comments on commit 832f7b0

Please sign in to comment.