mirror of
				https://github.com/flynx/colors.js.git
				synced 2025-10-31 03:50:11 +00:00 
			
		
		
		
	Revert "Prevent the defineProperty being called when property already exists"
This reverts commit 3f6fe70f39a00e2b120ec07f3eea6a1194e924ce.
This commit is contained in:
		
							parent
							
								
									d26602a2d7
								
							
						
					
					
						commit
						c0bc636d4d
					
				| @ -50,13 +50,11 @@ var addProperty = function (color, func) { | |||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   if (Object.defineProperty) { |   if (Object.defineProperty) { | ||||||
|     if(!String.prototype.hasOwnProperty(color)) { |  | ||||||
|     Object.defineProperty(String.prototype, color, { |     Object.defineProperty(String.prototype, color, { | ||||||
|       get : func, |       get : func, | ||||||
|       configurable: true, |       configurable: true, | ||||||
|       enumerable: false |       enumerable: false | ||||||
|     }); |     }); | ||||||
|     } |  | ||||||
|   } else { |   } else { | ||||||
|     String.prototype.__defineGetter__(color, func); |     String.prototype.__defineGetter__(color, func); | ||||||
|   } |   } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user