angular-three 1.6.7 → 1.6.9

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { ElementRef, inject, ChangeDetectorRef, Injectable, InjectionToken, ViewContainerRef, TemplateRef, Directive, Input, EventEmitter, getDebugNode, RendererFactory2, makeEnvironmentProviders, EnvironmentInjector, createEnvironmentInjector, Component, HostBinding, Output, ViewChild, Injector, Pipe, SkipSelf, ContentChild } from '@angular/core';
2
+ import { ElementRef, Injectable, inject, InjectionToken, ViewContainerRef, TemplateRef, Directive, Input, EventEmitter, getDebugNode, RendererFactory2, ChangeDetectorRef, makeEnvironmentProviders, EnvironmentInjector, createEnvironmentInjector, Component, HostBinding, Output, ViewChild, Injector, Pipe, SkipSelf, ContentChild } from '@angular/core';
3
3
  import { provideNgxResizeOptions, NgxResize } from 'ngx-resize';
4
4
  import { isObservable, of, map, from, tap, retry, catchError, share, ReplaySubject, switchMap, forkJoin, take, BehaviorSubject, startWith, combineLatest, filter, distinctUntilChanged, takeUntil, merge } from 'rxjs';
5
5
  import * as THREE from 'three';
@@ -516,7 +516,6 @@ function tapEffect(effectFn) {
516
516
  class NgtRxStore extends RxState {
517
517
  constructor() {
518
518
  super();
519
- const cdr = inject(ChangeDetectorRef, { optional: true });
520
519
  // set a dummy property so that initial this.get() won't return undefined
521
520
  this.set({ __ngt_dummy__: '__ngt_dummy__' });
522
521
  // call initialize that might be setup by derived Stores
@@ -533,14 +532,10 @@ class NgtRxStore extends RxState {
533
532
  modded[key] = value === undefined ? this.get(key) : value;
534
533
  return modded;
535
534
  }, {});
536
- const value = originalSet(modArgs);
537
- cdr?.detectChanges();
538
- return value;
535
+ return originalSet(modArgs);
539
536
  }
540
537
  // @ts-expect-error not sure why ...args here doesn't pass tuple check
541
- const value = originalSet(...args);
542
- cdr?.detectChanges();
543
- return value;
538
+ return originalSet(...args);
544
539
  };
545
540
  },
546
541
  });
@@ -2588,6 +2583,8 @@ function injectBeforeRender(cb, priority = 0) {
2588
2583
  }
2589
2584
 
2590
2585
  function safeDetectChanges(cdr) {
2586
+ if (!cdr)
2587
+ return;
2591
2588
  try {
2592
2589
  if (cdr['context']) {
2593
2590
  cdr.detectChanges();