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

[Question] why isServer should check global? #352

Open
manudeli opened this issue Oct 20, 2023 · 0 comments
Open

[Question] why isServer should check global? #352

manudeli opened this issue Oct 20, 2023 · 0 comments

Comments

@manudeli
Copy link
Member

export function isServer() {
return typeof window === 'undefined' && typeof global !== 'undefined';
}

We reuse isServer many times in slash libraries, but I don't know why we should check global in isServer. could I get slash's intention why check not only window also global please?

No global checking libraries

We can see no global checking in below links

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

No branches or pull requests

1 participant