tods-competition-factory 1.8.25 → 1.8.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -244,18 +244,21 @@ function cycleMutationStatus() {
244
244
  return status;
245
245
  }
246
246
  function addNotice({ topic, payload, key }) {
247
- syncGlobalState.modified = true;
248
247
  if (typeof topic !== "string" || typeof payload !== "object") {
249
248
  return;
250
249
  }
251
- if (syncGlobalState.disableNotifications || !syncGlobalState.subscriptions[topic])
250
+ if (!syncGlobalState.disableNotifications)
251
+ syncGlobalState.modified = true;
252
+ if (syncGlobalState.disableNotifications || !syncGlobalState.subscriptions[topic]) {
252
253
  return;
254
+ }
253
255
  if (key) {
254
256
  syncGlobalState.notices = syncGlobalState.notices.filter(
255
257
  (notice) => !(notice.topic === topic && notice.key === key)
256
258
  );
257
259
  }
258
260
  syncGlobalState.notices.push({ topic, payload, key });
261
+ return { ...SUCCESS };
259
262
  }
260
263
  function getNotices({ topic }) {
261
264
  const notices = syncGlobalState.notices.filter((notice) => notice.topic === topic).map((notice) => notice.payload);