fix toObject for extended attrs. close #86

This commit is contained in:
lavrton
2015-08-28 11:36:38 +07:00
parent 1872fd68da
commit ff6a2bf0cc
3 changed files with 15 additions and 0 deletions

View File

@@ -3015,4 +3015,15 @@ suite('Node', function() {
};
imageObj.src = 'assets/darth-vader.jpg';
});
test('toObject with extended prototypes', function() {
var node = new Konva.Circle({
id: 'foo',
radius: 10
});
Number.prototype.customFunc = function() {};
console.dir(node.toObject());
assert.equal(node.toObject().attrs.radius, 10);
delete Number.prototype.customFunc;
});
});