diff --git a/lib/class_builder.js b/lib/class_builder.js index fc8f7c8..8891786 100644 --- a/lib/class_builder.js +++ b/lib/class_builder.js @@ -321,9 +321,6 @@ function createConcreteCtor( cname, members ) return new ClassInstance(); } - // generate and store unique instance id - attachInstanceId( this, ++instance_id ); - initInstance( this ); this.__initProps(); @@ -335,6 +332,9 @@ function createConcreteCtor( cname, members ) return; } + // generate and store unique instance id + attachInstanceId( this, ++instance_id ); + // call the constructor, if one was provided if ( this.__construct instanceof Function ) {