Skip to content
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

[Code Refactor] Replace object checks with isObject function #29020

Closed
c0sc0s opened this issue May 8, 2024 · 1 comment
Closed

[Code Refactor] Replace object checks with isObject function #29020

c0sc0s opened this issue May 8, 2024 · 1 comment
Labels

Comments

@c0sc0s
Copy link

c0sc0s commented May 8, 2024

I find there were many code place use 'type of xxx === 'object' && xxx !== null'
I think should use a util function named isObject to optimize this behavior.
I could add this function to shared and replace the before code.
should i do that?

Looking forward to your feedback!

@sophiebits
Copy link
Collaborator

Hi @c0sc0s — thank you for the suggestion but we prefer the code as is. It is clearer to us and this style is understandable to anyone who knows JavaScript without needing to learn the purpose of the helper function.

@sophiebits sophiebits closed this as not planned Won't fix, can't repro, duplicate, stale May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants