Skip to content

Commit

Permalink
displayobject: Fix incorrect calling of custom init method
Browse files Browse the repository at this point in the history
Fixes #135
#135
  • Loading branch information
koggdal committed Jan 1, 2017
1 parent 02c0379 commit 8664e13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/displayobject.js
Expand Up @@ -908,8 +908,8 @@
var retObj = oCanvas.extend(Object.create(displayObject()), new obj(settings, core));

// Run initialization method if provided
if (init !== undefined && typeof display[name][init] === "function") {
display[name][init]();
if (init !== undefined && typeof retObj[init] === "function") {
retObj[init]();
}

// Return the new object
Expand Down

0 comments on commit 8664e13

Please sign in to comment.