mirror of
https://github.com/flynx/colors.js.git
synced 2026-01-04 17:51:20 +00:00
Use String.prototype instead of Object.prototype in defineProperty
This commit is contained in:
parent
4ddf4e5ce3
commit
52c0dcd005
@ -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