MCPcopy Create free account
hub / github.com/SKVNDR/FastDork / getListWithDefault

Function getListWithDefault

Script/siteconfig.js:96–107  ·  view source on GitHub ↗
(config, defaultConfig, key)

Source from the content-addressed store, hash-verified

94 }
95
96 function getListWithDefault(config, defaultConfig, key) {
97 if (Array.isArray(config?.[key]) && config[key].length > 0) {
98 return config[key];
99 }
100 if (
101 Array.isArray(defaultConfig?.[key]) &&
102 defaultConfig[key].length > 0
103 ) {
104 return defaultConfig[key];
105 }
106 return [];
107 }
108
109 function getStorageData(keys) {
110 return new Promise((resolve, reject) => {

Callers 1

loadConfigForEditingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected