mirror of
				https://github.com/flynx/colors.js.git
				synced 2025-10-31 12:00:08 +00:00 
			
		
		
		
	Fix #180 - Custom with multi attr failure
Fix #180 - Themes can have multiple attributes - but not in safe mode
This commit is contained in:
		
							parent
							
								
									a8ce90c51c
								
							
						
					
					
						commit
						dee3ab0494
					
				| @ -73,19 +73,17 @@ module['exports'] = function() { | |||||||
|       } else { |       } else { | ||||||
|         if (typeof(theme[prop]) === 'string') { |         if (typeof(theme[prop]) === 'string') { | ||||||
|           colors[prop] = colors[theme[prop]]; |           colors[prop] = colors[theme[prop]]; | ||||||
|           addProperty(prop, function() { |  | ||||||
|             return colors[theme[prop]](this); |  | ||||||
|           }); |  | ||||||
|         } else { |         } else { | ||||||
|  |           var tmp = colors[theme[prop][0]]; | ||||||
|  |           for (var t = 1; t < theme[prop].length; t++) { | ||||||
|  |             tmp = tmp[theme[prop][t]]; | ||||||
|  |           } | ||||||
|  |           colors[prop] = tmp; | ||||||
|  |         } | ||||||
|         addProperty(prop, function() { |         addProperty(prop, function() { | ||||||
|             var ret = this; |           return colors[prop](this); | ||||||
|             for (var t = 0; t < theme[prop].length; t++) { |  | ||||||
|               ret = colors[theme[prop][t]](ret); |  | ||||||
|             } |  | ||||||
|             return ret; |  | ||||||
|         }); |         }); | ||||||
|       } |       } | ||||||
|       } |  | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user