Skip to content

Commit 83ced41

Browse files
Update lib/internal/util.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent e50b0da commit 83ced41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ for (let i = 0; i < encodings.length; ++i)
861861
* @returns {Function} the same function, renamed
862862
*/
863863
function assignFunctionName(name, fn, descriptor = kEmptyObject) {
864-
if (typeof name === 'symbol') {
864+
if (typeof name !== 'string') {
865865
const symbolDescription = SymbolPrototypeGetDescription(name);
866866
assert(symbolDescription !== undefined, 'Attempted to name function after descriptionless Symbol');
867867
name = `[${symbolDescription}]`;

0 commit comments

Comments
 (0)