Skip to content

Commit 4d18701

Browse files
call 'remove-tab-state' correctly (close $5) (close #6)
1 parent c16b144 commit 4d18701

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/background/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ async function onSubmit({
9797

9898
// clear previous search on empty term
9999
if (!term) {
100-
TST.removeTabState({ tabs: '*', state: [].concat(Object.values(classes)), }).catch(onError);
100+
TST.removeTabState({ tabs: '*', state: [ ].concat(...Object.values(classes)), }).catch(onError);
101101
cache = null; delete actives[windowId];
102102
return { matches: 0, cleared: true, };
103103
}
@@ -179,7 +179,7 @@ async function onSubmit({
179179
(await Promise.all([
180180
TST.removeTabState({
181181
tabs: Array.from(tabs.byId.keys()), // Explicitly pass the IDs, to ensure consistent runtime with the other calls. The IDs have either just been queried, or wrer the ones that the classes were applied to.
182-
state: [].concat(Object.values(classes)),
182+
state: [ ].concat(...Object.values(classes)),
183183
}).catch(error => void onError(error)),
184184
...Object.keys(result).map(
185185
state => classes[state].length && result[state].size

0 commit comments

Comments
 (0)