@absolutejs/absolute 0.19.0-beta.984 → 0.19.0-beta.985

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.
@@ -9457,23 +9457,9 @@ var useResource = (fetcher, options = {}) => {
9457
9457
  // src/angular/composables/useSubscription.ts
9458
9458
  import { DestroyRef as DestroyRef2, inject as inject3 } from "@angular/core";
9459
9459
  import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
9460
- var warnedOnce = false;
9461
- var tryCaptureDestroyRef = () => {
9462
- try {
9463
- return inject3(DestroyRef2);
9464
- } catch {
9465
- if (!warnedOnce) {
9466
- warnedOnce = true;
9467
- console.warn("[absolute/angular] useSubscription was called outside an Angular injection context (likely from a lifecycle hook). Auto-teardown via takeUntilDestroyed is disabled for that call; the subscription will leak unless the caller manually unsubscribes. Move the call to a field initializer or the constructor, or pass the captured DestroyRef as the third argument.");
9468
- }
9469
- return null;
9470
- }
9471
- };
9472
9460
  function useSubscription(observable, observerOrNext, destroyRef) {
9473
- const captured = destroyRef ?? tryCaptureDestroyRef();
9461
+ const captured = destroyRef ?? inject3(DestroyRef2);
9474
9462
  const observer = typeof observerOrNext === "function" ? { next: observerOrNext } : observerOrNext;
9475
- if (!captured)
9476
- return observable.subscribe(observer);
9477
9463
  return observable.pipe(takeUntilDestroyed(captured)).subscribe(observer);
9478
9464
  }
9479
9465
  // src/angular/composables/useTimers.ts
@@ -10370,5 +10356,5 @@ export {
10370
10356
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
10371
10357
  };
10372
10358
 
10373
- //# debugId=AF4A6CBC43E323FC64756E2164756E21
10359
+ //# debugId=D2394F193AA2D73564756E2164756E21
10374
10360
  //# sourceMappingURL=browser.js.map