File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,15 +74,19 @@ utils.mergeThemeConfiguration = async (options) => {
7474 continue ;
7575 }
7676 const defaultVal = localConfig . settings [ key ] ;
77+ // Compare against the variation override (when present) so stale ones get cleared.
78+ const effectiveLocalVal = _ . has ( variation . settings , key )
79+ ? variation . settings [ key ]
80+ : defaultVal ;
7781 // Check for different types, and throw an error if they are found
78- if ( typeof defaultVal !== typeof remoteVal ) {
82+ if ( typeof effectiveLocalVal !== typeof remoteVal ) {
7983 throw new Error (
8084 `Theme configuration key "${ key } " cannot be merged because it is not of the same type. ` +
81- `Remote configuration is of type ${ typeof remoteVal } while local configuration is of type ${ typeof defaultVal } .` ,
85+ `Remote configuration is of type ${ typeof remoteVal } while local configuration is of type ${ typeof effectiveLocalVal } .` ,
8286 ) ;
8387 }
8488 // If a different value is found, overwrite the local config
85- if ( ! _ . isEqual ( defaultVal , remoteVal ) ) {
89+ if ( ! _ . isEqual ( effectiveLocalVal , remoteVal ) ) {
8690 if ( ! variation . settings ) {
8791 variation . settings = { } ;
8892 }
You can’t perform that action at this time.
0 commit comments