angular-three 1.6.4 → 1.6.6

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.
@@ -2061,6 +2061,10 @@ class NgtRenderer {
2061
2061
  // if both are three instances, straightforward case
2062
2062
  if (parent.__ngt_renderer__[0 /* NgtRendererClassId.type */] === 'three' &&
2063
2063
  newChild.__ngt_renderer__[0 /* NgtRendererClassId.type */] === 'three') {
2064
+ // if child already attached to a parent, skip
2065
+ if (getLocalState(newChild).parent)
2066
+ return;
2067
+ // attach THREE child
2064
2068
  attachThreeChild(parent, newChild);
2065
2069
  // here, we handle the special case of if the parent has a compoundParent, which means this child is part of a compound parent template
2066
2070
  if (!newChild.__ngt_renderer__[4 /* NgtRendererClassId.compound */])
@@ -2107,8 +2111,12 @@ class NgtRenderer {
2107
2111
  // if child is three but haven't been attached to a parent yet
2108
2112
  (newChild.__ngt_renderer__[0 /* NgtRendererClassId.type */] === 'three' && !getLocalState(newChild).parent) ||
2109
2113
  // or both parent and child are DOM elements
2110
- (parent.__ngt_renderer__[0 /* NgtRendererClassId.type */] === 'dom' &&
2111
- newChild.__ngt_renderer__[0 /* NgtRendererClassId.type */] === 'dom');
2114
+ ((parent.__ngt_renderer__[0 /* NgtRendererClassId.type */] === 'dom' ||
2115
+ (parent.__ngt_renderer__[0 /* NgtRendererClassId.type */] === 'compound' &&
2116
+ !parent.__ngt_renderer__[6 /* NgtRendererClassId.compounded */])) &&
2117
+ (newChild.__ngt_renderer__[0 /* NgtRendererClassId.type */] === 'dom' ||
2118
+ (newChild.__ngt_renderer__[0 /* NgtRendererClassId.type */] === 'compound' &&
2119
+ !newChild.__ngt_renderer__[6 /* NgtRendererClassId.compounded */])));
2112
2120
  if (shouldFindGrandparentInstance) {
2113
2121
  // we'll try to get the grandparent instance here so that we can run appendChild with both instances
2114
2122
  const closestGrandparentInstance = this.store.getClosestParentWithInstance(parent);
@@ -2649,7 +2657,7 @@ function injectNgtRef(initialValue = null) {
2649
2657
  function createRunInContext() {
2650
2658
  const nodeInjector = inject(Injector);
2651
2659
  const envInjector = inject(EnvironmentInjector);
2652
- const originalGet = envInjector.get;
2660
+ const originalGet = envInjector.get.bind(envInjector);
2653
2661
  return (cb) => {
2654
2662
  envInjector.get = (...args) => {
2655
2663
  try {