Skip to content

Conversation

@leomav
Copy link
Contributor

@leomav leomav commented May 29, 2023

In this PR we try to fix a matchWebGLToCanvasSize issue. This prop was always set to true event if we set it to false via . That's because in /hooks/use-unity-arguments.ts the matchWebGLToCanvasSize was being set with an OR operator which was always resulting to true.
Here is a screenshot of the only in-code change applied. By checking if the type is boolean we make sure that no other types like 'string' or 'undefined' are coming in, but if so, true should be the default value.

Screenshot 2023-05-29 at 5 05 12 PM

@leomav leomav requested a review from jeffreylanters as a code owner May 29, 2023 14:19
@leomav leomav force-pushed the fix_matchWebGLToCanvasSize branch from c5f1ff0 to 42bd04d Compare May 29, 2023 20:42
@leomav
Copy link
Contributor Author

leomav commented May 29, 2023

@jeffreylanters Sorry for that, i updated the PR cause I hadn't sing my commits :)

Leonidas Mavrotas added 2 commits May 30, 2023 13:19
Signed-off-by: Leonidas Mavrotas <leo.mav.8@gmail.com>
Signed-off-by: Leonidas Mavrotas <leo.mav.8@gmail.com>
@leomav leomav force-pushed the fix_matchWebGLToCanvasSize branch from 42bd04d to 6605893 Compare May 30, 2023 10:20
@leomav
Copy link
Contributor Author

leomav commented May 30, 2023

@jeffreylanters finally managed to add verification correctly this time. Sorry for wasting time, that was the first time doing that.

@jeffreylanters
Copy link
Owner

Hi Leonidas! Thank you for your pull request. Very sharp, this was indeed unintended behaviour. I'll merge it right away. 🦾

@jeffreylanters jeffreylanters merged commit c32af50 into jeffreylanters:main May 31, 2023
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