fix (helper): splitArray helper does not return emtpy string
This commit is contained in:
		
				
					committed by
					
						 Pierre Roullon
						Pierre Roullon
					
				
			
			
				
	
			
			
			
						parent
						
							8a25e9ba06
						
					
				
				
					commit
					80a62f29d8
				
			| @@ -40,7 +40,14 @@ var ProtoHelpersFuncMap = template.FuncMap{ | ||||
| 		return string(a) | ||||
| 	}, | ||||
| 	"splitArray": func(sep string, s string) []string { | ||||
| 		return strings.Split(s, sep) | ||||
| 		var r []string | ||||
| 		t := strings.Split(s, sep) | ||||
| 		for i := range t { | ||||
| 			if t[i] != "" { | ||||
| 				r = append(r, t[i]) | ||||
| 			} | ||||
| 		} | ||||
| 		return r | ||||
| 	}, | ||||
| 	"first": func(a []string) string { | ||||
| 		return a[0] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user