summaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2019-10-27 23:02:41 +0200
committersiikamiika <siikamiika@users.noreply.github.com>2019-10-27 23:02:41 +0200
commit9641747ba173eb6cc64b5881759d225253935e4a (patch)
tree0e40711ded4536e5756f1bc8a85fdaa3af616d57 /ext/bg/js/backend.js
parent51c35c9f306e48093fc769713675dca5b02d1398 (diff)
Revert "modify correct profile apiOptionsSet"
This reverts commit 51c35c9f306e48093fc769713675dca5b02d1398.
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 6d2e736e..71393467 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -122,15 +122,15 @@ class Backend {
if (typeof optionsContext.index === 'number') {
return profiles[optionsContext.index];
}
- const {profile} = this.getProfileFromContext(optionsContext);
+ const profile = this.getProfileFromContext(optionsContext);
return profile !== null ? profile : this.options.profiles[this.options.profileCurrent];
}
getProfileFromContext(optionsContext) {
- for (const [profileIndex, profile] of this.options.profiles.entries()) {
+ for (const profile of this.options.profiles) {
const conditionGroups = profile.conditionGroups;
if (conditionGroups.length > 0 && Backend.testConditionGroups(conditionGroups, optionsContext)) {
- return {profileIndex, profile};
+ return profile;
}
}
return null;