[Next 9.5.4] Symbol.prototype.description polyfill raises TypeError
See original GitHub issueBug report
Describe the bug
The Symbol.prototype.description
polyfill raises TypeError in Safari 11 or any other browser that does not support Symbol.prototype.description
natively.
To Reproduce
- Open a web page that runs on Next.js 9.5.4 or 9.5.5 (https://nextjs.org is handy, or you can set up a starter app locally:
npx create-next-app nextjs-blog --use-npm --example "https://github.com/vercel/next-learn-starter/tree/a24ee6c823/learn-starter" && cd nextjs-blog && npm install next@9.5.4 && npm run dev
) - Open developer tools
- Enter
Symbol.iterator.description
in the console TypeError: Cannot convert a symbol to a string
is raised
Expected behavior
Symbol.iterator.description === 'Symbol.iterator'
Screenshots
System information
- OS: iOS 11.4
- Browser: Mobile Safari 11
- Version of Next.js: 9.5.4-9.5.5
- Version of Node.js: 12.10.0
Additional context
/\((.+)\)/.exec(this)[1]
will not work on any browser as RegExp.prototype.exec
is spec’d to convert the argument to a string with the abstract operation ToString
and ToString(symbol)
throws a TypeError
exception. See https://tc39.es/ecma262/#sec-regexp.prototype.exec and https://tc39.es/ecma262/#sec-tostring .
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Symbol.prototype.description - JavaScript - MDN Web Docs
The read-only description property is a string returning the optional description of Symbol objects.
Read more >Symbol.prototype [ @@toPrimitive ] TypeError when deploying ...
Hi, I am trying to get a cloud function to run on GCP with an auto-generated GraphQL SDK from https://graphql-code-generator.com/.
Read more >Changelog - Cypress Documentation
When a chromium based browser tab or process crashes, Cypress will no longer hang indefinitely but will fail the current test and move...
Read more >symbol.prototype.description - npm
This package implements the es-shim API interface. It works in an ES6-supported environment and complies with the spec. Most common usage: var ...
Read more >Symbol.prototype Comparison Error - javascript - Stack Overflow
Because performing == (sloppy) comparison tries to convert Symbol.prototype to primitive value using @@toPrimitive but this will work only ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1 “next”: “^9.5” => “next”: “9.5.3”
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.