forked from MapComplete/MapComplete
		
	Don't emit an error if multiple overrides add to a list
This commit is contained in:
		
							parent
							
								
									47b50e2b94
								
							
						
					
					
						commit
						1f5c594f34
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -246,6 +246,10 @@ class OverrideShadowingCheck extends DesugaringStep<LayoutConfigJson> {
 | 
			
		|||
 | 
			
		||||
        for (const layer of withOverride) {
 | 
			
		||||
            for (const key in overrideAll) {
 | 
			
		||||
                if(key.endsWith("+") || key.startsWith("+")){
 | 
			
		||||
                    // This key will _add_ to the list, not overwrite it - so no warning is needed
 | 
			
		||||
                    continue
 | 
			
		||||
                }
 | 
			
		||||
                if (layer["override"][key] !== undefined || layer["override"]["=" + key] !== undefined) {
 | 
			
		||||
                    const w = "The override of layer " + JSON.stringify(layer["builtin"]) + " has a shadowed property: " + key + " is overriden by overrideAll of the theme";
 | 
			
		||||
                    errors.push(w)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue