Add function to create default options

This commit is contained in:
toasted-nutbread 2019-09-05 19:56:29 -04:00
parent ec110fa1b7
commit 5ddbb0373f

View File

@ -183,8 +183,8 @@ function optionsFieldTemplates() {
`.trim();
}
function optionsSetDefaults(options) {
const defaults = {
function optionsCreateDefaults() {
return {
general: {
enable: true,
audioSource: 'jpod101',
@ -238,6 +238,10 @@ function optionsSetDefaults(options) {
fieldTemplates: optionsFieldTemplates()
}
};
}
function optionsSetDefaults(options) {
const defaults = optionsCreateDefaults();
const combine = (target, source) => {
for (const key in source) {