Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit dd27a80

Browse files
author
Alex Mourzina
committedSep 15, 2016
fix bug with sync init
1 parent 4442dec commit dd27a80

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed
 

‎Core.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,11 @@ Core = {
434434
if (_class.hasOwnProperty('__inited__'))
435435
continue;
436436
if (_class.__init instanceof Function) {
437-
_class.__init();
437+
(function(_class) {
438+
setImmediate(function() {
439+
_class.__init();
440+
})
441+
})(_class);
438442
}
439443
for(var method in _class) {
440444
var events;
@@ -487,7 +491,9 @@ Core = {
487491
if( _class.hasOwnProperty('__inited__') && _class.__inited__ )
488492
return;
489493
if( _class.__init instanceof Function ) {
490-
_class.__init();
494+
setImmediate(function() {
495+
_class.__init();
496+
})
491497
}
492498
for( var method in _class ) {
493499
var events;

0 commit comments

Comments
 (0)
Please sign in to comment.