-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: force strict check for group variable in UniformGroup #9454
Conversation
This aims to solve pixijs#9414 where safari invented the group method in arrays and that made it so arrays now were detected as UniformGroups
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit c1bff66:
|
Nice fix. Could you add an inline comment about this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, would like to @GoodBoyDigital to weigh-in as he understands the uniform stuff most deeply.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is cool, i wander would it be less magical and error prone if we just renamed group
property to isUniformGroup
?
We have renamed this in v8, so this can be merged as is and avoid any breaking changes / deprecations |
Description of change
This aims to solve #9414 where safari invented the group method in arrays and that made it so arrays now were detected as UniformGroups.
I achieved this by trying to find every place that a UniformGroup is used and where we check for the
group
variable and forced an strict check with true. By doing this, truthy values are not enough, we must have that value set to true.I would like for somebody with more knowledge on UniformGroup code to see if I missed anything and if my solution makes sense.