Skip to content

Commit d742b33

Browse files
committed
Rearrange some code execute to make sure loaded is asset in correct position
1 parent a9fc8d0 commit d742b33

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

public/js/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1901,6 +1901,7 @@ socket.on('refresh', function (data) {
19011901
updatePermission(data.permission);
19021902
updateLastInfo(data);
19031903
if (!loaded) {
1904+
// auto change mode if no content detected
19041905
var nocontent = editor.getValue().length <= 0;
19051906
if (nocontent) {
19061907
if (visibleXS)
@@ -1913,9 +1914,9 @@ socket.on('refresh', function (data) {
19131914
editor.focus();
19141915
editor.refresh();
19151916
}
1916-
loaded = true;
19171917
updateViewInner(); // bring up view rendering earlier
19181918
updateHistory(); //update history whether have content or not
1919+
loaded = true;
19191920
emitUserStatus(); //send first user status
19201921
updateOnlineStatus(); //update first online status
19211922
setTimeout(function () {

0 commit comments

Comments
 (0)