Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Refactor the getSettings code to allow for dynamic default values #3544

Closed
bsclifton opened this issue Aug 29, 2016 · 1 comment · Fixed by #4640
Closed

Refactor the getSettings code to allow for dynamic default values #3544

bsclifton opened this issue Aug 29, 2016 · 1 comment · Fixed by #4640

Comments

@bsclifton
Copy link
Member

For reference, see

module.exports.getSetting = (settingKey, settingsCollection) => {

The code currently has a special hard-coded case for settingKey === settings.ACTIVE_PASSWORD_MANAGER. Instead of having an if statement (which executes for every call) this could be reworked to have a default value determined in resolveValue(). The code is already lookup up static values using the format config.settings[key] but currently doesn't have a mechanism for handling more dynamic values, like the logic found in passwordManagerDefault().

cc: @BrendanEich

@bsclifton
Copy link
Member Author

Re-opening; issue was auto-closed when potential fix was submitted with #4640 (which never got reviewer feedback)

@bsclifton bsclifton added this to the Triage Backlog milestone Nov 27, 2017
@bsclifton bsclifton removed this from the Triage Backlog milestone Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant