Skip to content

Commit 9c0ca48

Browse files
authoredJun 8, 2023
Merge pull request #95 from chihai-chuck/master
[optimized] runtime environment judgment
2 parents 88e4a98 + 1e798a5 commit 9c0ca48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎lib/utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ function isPrimitive (o) {
1616

1717
function isBrowser () {
1818
return (
19-
typeof window !== 'undefined' &&
20-
typeof document !== 'undefined'
19+
typeof process === 'undefined' ||
20+
Object.prototype.toString.call(process) !== '[object process]'
2121
)
2222
}
2323

0 commit comments

Comments
 (0)
Please sign in to comment.