Allow user to set his own defaults

This commit is contained in:
Hacktivista 2017-08-30 16:19:59 -03:00
parent ebcf6c957d
commit badb5c3cfe

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;