Fix #2338: stop subconfig unbinds being forgotten

This commit is contained in:
Oliver Blanthorn 2020-05-04 14:02:57 +01:00
parent 1c4722f4db
commit 7594cfc73f
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -1024,7 +1024,7 @@ export class default_config {
}
/** @hidden */
const DEFAULTS = o(new default_config())
export const DEFAULTS = o(new default_config())
/** Given an object and a target, extract the target if it exists, else return undefined
@ -1091,7 +1091,6 @@ export const mergeDeepCull = R.pipe(mergeDeep, removeNull)
/** @hidden
* Gets a site-specific setting.
*/
export function getURL(url: string, target: string[]) {
function _getURL(conf, url, target) {
if (!conf.subconfigs) return undefined
@ -1119,7 +1118,7 @@ export function getURL(url: string, target: string[]) {
target,
)
if (acc instanceof Object && curVal instanceof Object)
return mergeDeepCull(acc, curVal)
return mergeDeep(acc, curVal)
return curVal
},
undefined as any,