Add function to create default options
This commit is contained in:
parent
ec110fa1b7
commit
5ddbb0373f
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user