Skip to content

NodeUtils: Replace instanceof Array with Array.isArray().#33262

Merged
Mugen87 merged 1 commit into
mrdoob:devfrom
Mridul012:fix-array-isarray-nodeutils
Mar 28, 2026
Merged

NodeUtils: Replace instanceof Array with Array.isArray().#33262
Mugen87 merged 1 commit into
mrdoob:devfrom
Mridul012:fix-array-isarray-nodeutils

Conversation

@Mridul012

Copy link
Copy Markdown

Summary

Replaces instanceof Array with Array.isArray for more robust array checking.

Impact

Array.isArray is the recommended approach and works correctly across different execution contexts. No functional change intended.

@github-actions

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 360.01
85.46
360.01
85.46
+0 B
+0 B
WebGPU 633.38
175.63
633.38
175.63
-2 B
-3 B
WebGPU Nodes 631.5
175.34
631.5
175.34
-2 B
-3 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 492.21
120.03
492.21
120.03
+0 B
+0 B
WebGPU 705.41
190.51
705.41
190.51
-2 B
-1 B
WebGPU Nodes 654.63
177.77
654.63
177.77
-2 B
+0 B

@Mugen87 Mugen87 changed the title refactor(NodeUtils): replace instanceof Array with Array.isArray NodeUtils: Replace instanceof Array with Array.isArray(). Mar 28, 2026
@Mugen87 Mugen87 added this to the r184 milestone Mar 28, 2026
@Mugen87 Mugen87 merged commit e09e86d into mrdoob:dev Mar 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants