Skip to content

Commit

Permalink
Fix mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Jun 24, 2019
1 parent 53c43b8 commit 14d35c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class OptionsSync<TOptions extends OptionsSync.Options> {
*/
async setAll(newOptions: TOptions): Promise<void> {
return new Promise((resolve, reject) => {
chrome.storage.sync.get({
chrome.storage.sync.set({
[this.storageName]: newOptions
}, () => {
if (chrome.runtime.lastError) {
Expand Down Expand Up @@ -248,13 +248,13 @@ class OptionsSync<TOptions extends OptionsSync.Options> {
this._log('groupEnd');
}

_handleFormUpdatesDebounced(event: Event): void {
_handleFormUpdatesDebounced({target}: Event): void {
if (this._timer) {
clearTimeout(this._timer);
}

this._timer = setTimeout(() => {
this._handleFormUpdates(event.currentTarget as HTMLFormElement);
this._handleFormUpdates(target as HTMLFormElement);
this._timer = undefined;
}, 600);
}
Expand Down

0 comments on commit 14d35c2

Please sign in to comment.