Skip to content

DataTextureLoader: Move return in catch block to correct position.#33243

Merged
Mugen87 merged 2 commits into
mrdoob:devfrom
Om-Mishra09:fix/datatextureloader-crash
Mar 25, 2026
Merged

DataTextureLoader: Move return in catch block to correct position.#33243
Mugen87 merged 2 commits into
mrdoob:devfrom
Om-Mishra09:fix/datatextureloader-crash

Conversation

@Om-Mishra09

@Om-Mishra09 Om-Mishra09 commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Description
This PR fixes a missing return statement in the DataTextureLoader.js error handling block.

Previously, if a parsing error occurred and an onError callback was provided, the callback was invoked but execution continued, eventually throwing a TypeError when evaluating texData.image. This moves the return; statement to ensure execution halts appropriately.

@github-actions

github-actions Bot commented Mar 25, 2026

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.22
175.54
633.22
175.54
+0 B
+0 B
WebGPU Nodes 631.34
175.25
631.34
175.25
+0 B
+0 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.25
190.44
705.25
190.44
+0 B
+0 B
WebGPU Nodes 654.47
177.68
654.47
177.68
+0 B
+0 B

Comment thread test/unit/src/loaders/DataTextureLoader.tests.js Outdated
@Mugen87

Mugen87 commented Mar 25, 2026

Copy link
Copy Markdown
Collaborator

This PR fixes a critical bug inside DataTextureLoader.js

Just for the sake of correctness: This is not a critical bug. The wording you (or your AI) choose here is completely inappropriate.

@Mugen87 Mugen87 merged commit a14d874 into mrdoob:dev Mar 25, 2026
10 checks passed
@Mugen87 Mugen87 added this to the r184 milestone Mar 25, 2026
@Mugen87 Mugen87 changed the title Fix missing return in DataTextureLoader catch block DataTextureLoader: Move return in catch block to correct position. Mar 25, 2026
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