fix templater: Guard against empty parent reference
This commit is contained in:
		
							parent
							
								
									bace4dd895
								
							
						
					
					
						commit
						756a4c745d
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -143,7 +143,7 @@ func applyLimits(rs *[]context.ResourceSet, include *[]string, exclude *[]string
 | 
				
			||||||
// Check whether an include/exclude string slice matches a resource set
 | 
					// Check whether an include/exclude string slice matches a resource set
 | 
				
			||||||
func matchesResourceSet(s *[]string, rs *context.ResourceSet) bool {
 | 
					func matchesResourceSet(s *[]string, rs *context.ResourceSet) bool {
 | 
				
			||||||
	for _, r := range *s {
 | 
						for _, r := range *s {
 | 
				
			||||||
		if r == rs.Name || r == *rs.Parent {
 | 
							if r == rs.Name || (rs.Parent != nil && r == *rs.Parent) {
 | 
				
			||||||
			return true
 | 
								return true
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue