mirror of
https://github.com/flynx/colors.js.git
synced 2025-11-01 04:20:12 +00:00
Merge pull request #52 from jakub-g/master
[fix] Use String.prototype instead of Object.prototype in defineProperty
This commit is contained in:
commit
c93fd972f7
@ -50,7 +50,7 @@ var addProperty = function (color, func) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (Object.defineProperty) {
|
if (Object.defineProperty) {
|
||||||
Object.defineProperty(Object.prototype, color, {
|
Object.defineProperty(String.prototype, color, {
|
||||||
get : func,
|
get : func,
|
||||||
configurable: true,
|
configurable: true,
|
||||||
enumerable: false
|
enumerable: false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user