cleaned up getLayer fix logic

This commit is contained in:
Eric Rowell
2013-11-27 08:24:47 -08:00
parent cbcd7d6c89
commit 1f6c8e7194

View File

@@ -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