mirror of
https://github.com/konvajs/konva.git
synced 2026-03-03 16:58:33 +08:00
cleaned up getLayer fix logic
This commit is contained in:
@@ -829,11 +829,8 @@
|
||||
* @memberof Kinetic.Node.prototype
|
||||
*/
|
||||
getLayer: function() {
|
||||
if (this.getParent()) {
|
||||
return this.getParent().getLayer();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
var parent = this.getParent();
|
||||
return parent ? parent.getLayer() : null;
|
||||
},
|
||||
/**
|
||||
* get stage ancestor
|
||||
|
||||
Reference in New Issue
Block a user