fix env to work in electron correctly
The problem is: electron env includes and browser and nodejs together.
Therefore, both isBrowser and isNodejs function will return true.
The comment in the code mentions, that isBrowser is explictly called first
to prevent electron renderer process to be initialized with
wrong environment due to isNodejs() returning true.
But current code (before the change) executes both isBrowser and isNodejs blocks.
This commit resolves the issue.
Showing
Please
register
or
sign in
to comment