Skip to content

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Mar 22, 2023

Fixed #25699.

Description

Ensures the material tab in the editor does not break when textures with null as their image value is loaded.

@Mugen87 Mugen87 added this to the r151 milestone Mar 22, 2023
@Mugen87 Mugen87 merged commit 728bfed into mrdoob:dev Mar 22, 2023
@makc
Copy link
Contributor

makc commented Mar 22, 2023

I remember you guys were so tight about undefined/null issues, should you not be fixing this here instead?

@mrdoob
Copy link
Owner

mrdoob commented Mar 22, 2023

The null check seems to be fine?

https://github.com/mrdoob/three.js/blob/dev/src/textures/Source.js#L6

If anything, the undefined check should be needed?

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Mar 22, 2023

Yeah, I think this comes from a time when we used undefined as the default image value.

@makc
Copy link
Contributor

makc commented Mar 22, 2023

a time when we used undefined

ah so it is null now, btw why did you switch? was undefined causing problems?

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Mar 23, 2023

Using null as a default value is just more robust then undefined.

@makc
Copy link
Contributor

makc commented Mar 26, 2023

Using null as a default value is just more robust then undefined.

I have found the patient zero of this... line of thought - it was @stephomi, 10 years ago 👈

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.

dropping 3ds file into the editor breaks material panel

3 participants