@rdlabo/ionic-angular-kit 21.4.8 → 21.4.10

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.
@@ -1352,7 +1352,7 @@ class OfflineSessionService {
1352
1352
  await this.initialize();
1353
1353
  if (lease && !lease.isCurrent())
1354
1354
  return false;
1355
- const normalizedScopeIds = [...new Set(scopeIds)].filter((id) => id !== 0).sort((a, b) => a - b);
1355
+ const normalizedScopeIds = [...new Set(scopeIds)].sort((a, b) => a - b);
1356
1356
  const previousUserId = await this.#repository.getLastUserId();
1357
1357
  if (lease && !lease.isCurrent())
1358
1358
  return false;
@@ -2765,8 +2765,13 @@ const offlineInterceptor = (request, next) => {
2765
2765
  function observeTransport(source, network) {
2766
2766
  return source.pipe(tap({
2767
2767
  next: (event) => {
2768
- if (event instanceof HttpResponse)
2769
- network.markApiSuccess();
2768
+ if (!(event instanceof HttpResponse))
2769
+ return;
2770
+ if (event.headers.get(OFFLINE_RESPONSE_HEADER) === 'local') {
2771
+ network.markApiFailure();
2772
+ return;
2773
+ }
2774
+ network.markApiSuccess();
2770
2775
  },
2771
2776
  error: (error) => {
2772
2777
  if (isOfflineFallbackError(error))