Skip to content

Commit 4e684f2

Browse files
fix(core): fix toStringTag symbol for typed array
1 parent 63fc7df commit 4e684f2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/bootstrap.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ for ( let name of [
6060
'BigUint64Array'
6161
] ) {
6262

63-
if ( global[name] )
64-
global[name].prototype[Symbol.toStringTag] = name;
63+
if ( global[name] && !(Symbol.toStringTag in global[name].prototype) )
64+
Object.defineProperty(global[name].prototype, Symbol.toStringTag, { value: name });
65+
6566
}
6667

6768

0 commit comments

Comments
 (0)