From 52c0dcd00556bb14c5f2509e44a4ea190db1ca6e Mon Sep 17 00:00:00 2001 From: jakub-g Date: Tue, 2 Jul 2013 17:39:45 +0200 Subject: [PATCH] Use String.prototype instead of Object.prototype in defineProperty --- colors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colors.js b/colors.js index 1cf8636..8f1b372 100644 --- a/colors.js +++ b/colors.js @@ -50,7 +50,7 @@ var addProperty = function (color, func) { }; if (Object.defineProperty) { - Object.defineProperty(Object.prototype, color, { + Object.defineProperty(String.prototype, color, { get : func, configurable: true, enumerable: false