|
@@ -285,7 +285,7 @@ var Common = {
|
|
|
},
|
|
|
isFunction: function isFunction( obj ) {
|
|
|
|
|
|
- return Object.prototype.toString.call( obj ) === '[object Function]';
|
|
|
+ return obj instanceof Function;
|
|
|
|
|
|
}
|
|
|
};
|
|
@@ -959,9 +959,10 @@ Object.defineProperty( Color.prototype, 'a', {
|
|
|
Object.defineProperty( Color.prototype, 'hex', {
|
|
|
get: function get$$1() {
|
|
|
|
|
|
- if ( ! this.__state.space !== 'HEX' ) {
|
|
|
+ if ( this.__state.space !== 'HEX' ) {
|
|
|
|
|
|
this.__state.hex = ColorMath.rgb_to_hex( this.r, this.g, this.b );
|
|
|
+ this.__state.space = 'HEX';
|
|
|
|
|
|
}
|
|
|
return this.__state.hex;
|