Merge pull request #241 from Hacktivista/set-user-defaults-2

Allow user to set his own defaults (simpler)
This commit is contained in:
Josh Johnson 2017-09-05 08:39:45 +01:00 committed by GitHub
commit f29307ec47

View file

@ -128,7 +128,7 @@ class Choices {
};
// Merge options with user options
this.config = extend(defaultConfig, userConfig);
this.config = extend(defaultConfig, Choices.userDefaults, userConfig);
if (this.config.renderSelectedChoices !== 'auto' && this.config.renderSelectedChoices !== 'always') {
if (!this.config.silent) {
@ -2867,4 +2867,6 @@ class Choices {
/* ===== End of Private functions ====== */
}
Choices.userDefaults = {};
module.exports = Choices;