Skip to content

Commit 1c6af76

Browse files
committed
Always honor the "Collapse blocked objects" option.
1 parent 4b837ac commit 1c6af76

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bg/RequestGuard.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@
334334
}
335335
options.push({label: _("allowLocal", origin)});
336336
}
337+
const OPT_COLLAPSE = options.length;
337338
options.push({label: _("CollapseBlockedObjects")});
338339
let t = u => `${TAG}@${u}`;
339340
let ret = await Prompts.prompt({
@@ -342,7 +343,7 @@
342343
options});
343344
debug(`Prompt returned`, ret, sender); // DEV_ONLY
344345
if (ret.button !== 0) return;
345-
if (ret.option === 2) {
346+
if (ret.option === OPT_COLLAPSE) {
346347
return {collapse: "all"};
347348
}
348349
let key = [siteKey, origin][ret.option || 0];

0 commit comments

Comments
 (0)