diff --git a/packages/core/src/Stores/pushwoosh-store.js b/packages/core/src/Stores/pushwoosh-store.js index 04b163fe9dcf..b686cff64001 100644 --- a/packages/core/src/Stores/pushwoosh-store.js +++ b/packages/core/src/Stores/pushwoosh-store.js @@ -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, () => { @@ -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;