summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-05-29 19:44:53 -0400
committerGitHub <noreply@github.com>2020-05-29 19:44:53 -0400
commit37f0396f1cf4f74833d9a4a364f503f4a7c3e34a (patch)
tree53f91dd03d592fbef83a776f8ee5e3d84cf254b0 /ext/bg/js/settings
parent9d40955fc822f4cea141ecb9abf4a838ffe90eb9 (diff)
DOM binder fixes (#564)
* Fix incorrect updateValue function * Add source
Diffstat (limited to 'ext/bg/js/settings')
-rw-r--r--ext/bg/js/settings/dom-settings-binder.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/bg/js/settings/dom-settings-binder.js b/ext/bg/js/settings/dom-settings-binder.js
index 0441ec29..4b63859f 100644
--- a/ext/bg/js/settings/dom-settings-binder.js
+++ b/ext/bg/js/settings/dom-settings-binder.js
@@ -22,8 +22,9 @@
*/
class DOMSettingsBinder {
- constructor({getOptionsContext, transforms=null}) {
+ constructor({getOptionsContext, source=null, transforms=null}) {
this._getOptionsContext = getOptionsContext;
+ this._source = source;
this._defaultScope = 'profile';
this._dataBinder = new DOMDataBinder({
selector: '[data-setting]',
@@ -97,7 +98,7 @@ class DOMSettingsBinder {
}
settingsTargets.push(target);
}
- return this._transformResults(await api.modifySettings(settingsTargets), targets);
+ return this._transformResults(await api.modifySettings(settingsTargets, this._source), targets);
}
_transform(value, transform, metadata, element) {