@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.
- package/fesm2022/rdlabo-ionic-angular-kit-offline.mjs +8 -3
- package/fesm2022/rdlabo-ionic-angular-kit-offline.mjs.map +1 -1
- package/fesm2022/rdlabo-ionic-angular-kit.mjs +21 -12
- package/fesm2022/rdlabo-ionic-angular-kit.mjs.map +1 -1
- package/package.json +1 -1
- package/types/rdlabo-ionic-angular-kit.d.ts +16 -3
|
@@ -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)].
|
|
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
|
-
|
|
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))
|