Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit aabd452

Browse files
author
soliury
committed
only checkout codepush in production mod
1 parent fc4c790 commit aabd452

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/layouts/Utils.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ class Utils extends Component {
2020
// actions.toast('登陆成功');
2121
// });
2222
// }
23-
codePush.sync();
24-
AppState.addEventListener("change", (newState) => {
25-
newState === "active" && codePush.sync();
26-
});
23+
if (!__DEV__) {
24+
codePush.sync();
25+
AppState.addEventListener("change", (newState) => {
26+
newState === "active" && codePush.sync();
27+
});
28+
}
2729
}
2830

2931

0 commit comments

Comments
 (0)