Skip to content

Commit 30e79b2

Browse files
committed
Fix app ready state
1 parent e17e24a commit 30e79b2

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

js/app/app.js

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
1-
define(['app/visualizers/base', 'underscore', 'bean', 'app/models/DesktopQueue', 'app/view'], function (Base, _, Bean, DesktopQueue, view) {
1+
define(['app/visualizers/base', 'underscore', 'bean', 'app/models/DesktopQueue', 'app/view', 'jquery'], function (Base, _, Bean, DesktopQueue, view, $) {
22

33
var App = {
44

55
init: function() {
66

7-
var onLoadFunc = function () {
8-
Bean.off(document, 'onload');
97

8+
$(document).ready(function(){
109
DesktopQueue.init();
1110
view.init();
12-
};
11+
});
1312

14-
if (document.readyState === "complete") {
15-
onLoadFunc();
16-
} else {
17-
Bean.on(document, 'onload', onLoadFunc);
18-
}
1913
}
2014

2115
};

0 commit comments

Comments
 (0)