ericdrowell / KineticJS

KineticJS is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.
http://www.kineticjs.com
3.98k stars 753 forks source link

Node.prototype.toObject #1040

Open AimForNaN opened 9 years ago

AimForNaN commented 9 years ago

Currently located at (near): https://github.com/ericdrowell/KineticJS/blob/master/kinetic.js#L3314

On a project i'm currently working on, the following line of code throws an error, saying undefined is not a function:

defaultValue = getter ? getter.call(this) : null;

This can be resolved by changing that line to:

defaultValue = type._isFunction(getter) ? getter.call(this) : null;