Skip to content

Commit

Permalink
Maryia/edited a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
maryia-deriv-archive committed Feb 21, 2022
1 parent 6233819 commit 9dfa424
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/core/src/Stores/pushwoosh-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ export default class PushwooshStore extends BaseStore {
init = () => {
let reaction_id;
if (!this.root_store.common.is_network_online) {
// register a reaction that has to be executed only once
// when is_network_online is true for the first time after false:
reaction_id = when(
() => this.root_store.common.is_network_online,
() => {
Expand All @@ -31,6 +29,7 @@ export default class PushwooshStore extends BaseStore {
);
return;
}
// canceling the reaction once is_network_online becomes true for the first time:
reaction_id?.cancel();
if (!this.is_applicable && this.has_initialized) return;

Expand Down

0 comments on commit 9dfa424

Please sign in to comment.