Skip to content

Commit

Permalink
Fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
DefeNder93 committed Jul 21, 2017
1 parent 4c51d12 commit 0b4c716
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Core.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ Core = {
if(_class.Init) {
FireEvent(new _class.Init);
}
if( Object.defineProperty && Object.getOwnPropertyDescriptor(_class, '__inited__') && Object.getOwnPropertyDescriptor(_class, '__inited__').writable !== false ) {
if (Object.defineProperty) {
Object.defineProperty(_class, '__inited__', { value: true});
} else {
_class.__inited__ = true
Expand All @@ -492,7 +492,7 @@ Core = {
, processObject: function(object) {
var _class = object;

if( _class.hasOwnProperty('__inited__') && _class.__inited__ )
if( _class.hasOwnProperty('__inited__') && _class.__inited__)
return;
if( _class.__init instanceof Function ) {
setImmediate(function() {
Expand Down Expand Up @@ -543,7 +543,11 @@ Core = {
console.error(e.stack ? e.message : e, e.stack ? e.stack : 'no stack provided');
}
}
_class.__inited__ = true;
if (Object.defineProperty) {
Object.defineProperty(_class, '__inited__', { value: true});
} else {
_class.__inited__ = true
}

return object;
}
Expand Down

0 comments on commit 0b4c716

Please sign in to comment.