mirror of
https://github.com/konvajs/konva.git
synced 2025-12-21 19:27:08 +08:00
bug fix - when setting a custom attr that points to self, the setAttrs method no longer gets stuck in a recursive loop throwing a stack overflow error. Also, objects that were instantiated from a class (non-literal objects) are no longer serializable
This commit is contained in:
@@ -157,10 +157,10 @@ Kinetic.Node.prototype = {
|
||||
}
|
||||
|
||||
/*
|
||||
* if property is an object, then add an empty object
|
||||
* if property is a pure object (no methods), then add an empty object
|
||||
* to the node and then traverse
|
||||
*/
|
||||
if(go._isObject(val) && !go._isArray(val) && !go._isElement(val)) {
|
||||
if(go._isObject(val) && !go._isArray(val) && !go._isElement(val) && !go._hasMethods(val)) {
|
||||
if(obj[key] === undefined) {
|
||||
obj[key] = {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user