forked from MapComplete/MapComplete
		
	Chore: add sanity check on tag length
This commit is contained in:
		
							parent
							
								
									dfce217288
								
							
						
					
					
						commit
						7a892480cc
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -19,6 +19,9 @@ export class Tag extends TagsFilter {
 | 
				
			||||||
        if (value === undefined) {
 | 
					        if (value === undefined) {
 | 
				
			||||||
            throw `Invalid value while constructing a Tag with key '${key}': value is undefined`
 | 
					            throw `Invalid value while constructing a Tag with key '${key}': value is undefined`
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        if(value.length > 255 || key.length > 255){
 | 
				
			||||||
 | 
					            throw "Invalid tag: length is over 255"
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        if (value === "*") {
 | 
					        if (value === "*") {
 | 
				
			||||||
            console.warn(`Got suspicious tag ${key}=*   ; did you mean ${key}~* ?`)
 | 
					            console.warn(`Got suspicious tag ${key}=*   ; did you mean ${key}~* ?`)
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue