Skip to content

Commit 8e1617a

Browse files
committed
fix(core): check for uuid before comparing uuid in instance store
1 parent 935e32a commit 8e1617a

File tree

4 files changed

+531
-528
lines changed

4 files changed

+531
-528
lines changed

apps/kitchen-sink/src/app/postprocessing/outline/experience.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import { KernelSize } from 'postprocessing';
5252
</ngt-group>
5353
5454
<ngtp-effect-composer [options]="{ autoClear: false, multisampling: 0 }">
55+
<!-- TODO: outline not working -->
5556
<ngtp-outline [options]="{ edgeStrength: 2.5, pulseSpeed: 0, blur: true, kernelSize: KernelSize.SMALL }" />
5657
<ngtp-smaa />
5758
</ngtp-effect-composer>

libs/core/src/lib/instance.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ export function prepare<TInstance extends object = NgtAnyRecord>(
6060
nonObjects: nonObjectsChanged,
6161
add(object, type) {
6262
const current = instance.__ngt__.instanceStore.snapshot[type];
63-
const foundIndex = current.findIndex((node: NgtInstanceNode) => object === node || object.uuid === node.uuid);
63+
const foundIndex = current.findIndex(
64+
(node: NgtInstanceNode) => object === node || (!!object.uuid && !!node.uuid && object.uuid === node.uuid),
65+
);
6466

6567
if (foundIndex > -1) {
6668
current.splice(foundIndex, 1, object);

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@storybook/theming": "^8.3.6",
5555
"@swc-node/register": "1.10.9",
5656
"@swc/cli": "0.4.0",
57-
"@swc/core": "1.7.28",
57+
"@swc/core": "1.7.40",
5858
"@types/jest": "29.5.14",
5959
"@types/node": "20.14.12",
6060
"@types/three": "^0.169.0",
@@ -120,7 +120,7 @@
120120
"@dimforge/rapier3d-compat": "^0.14.0",
121121
"@ionic/angular": "^7.0.0",
122122
"@monogrid/gainmap-js": "^3.0.6",
123-
"@nativescript/angular": "^18.1.1",
123+
"@nativescript/angular": "^18.1.3",
124124
"@nativescript/canvas": "2.0.0-webgpu.11",
125125
"@nativescript/canvas-media": "2.0.0-webgpu.11",
126126
"@nativescript/canvas-three": "2.0.0-webgpu.11",

0 commit comments

Comments
 (0)