question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Symbol.iterator doesn't work on Safari Version 8.0 (10600.1.25.1)

See original GitHub issue
Symbol = require('es6-symbol')
array = [1, 2, 3]

array[Symbol.iterator]
// returns undefined

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
medikoocommented, Oct 11, 2015

For that you need to ensure that Array.prototype[@@iterator] is implemented. es6-symbol, doesn’t fix any native implementation by default (same way you don’t have Symbol constructor available).

You can achieve what you want two ways:

1. Without fixing native environment
var Symbol = require('es6-symbol');
var iteratorMethod = require('es5-ext/array/#/@@iterator');
var array = [1, 2, 3];
array[Symbol.iterator] = iteratorMethod;
typeof array[Symbol.iterator]; // 'function'
2. With fixing native env
require('es6-symbol/implement');
require('es5-ext/array/#/@@iterator/implement');
var array = [1, 2, 3];
typeof array[Symbol.iterator]; // 'function'
0reactions
quantuminformationcommented, Jan 29, 2020

No error is thrown, the tv stops parsing any is after symbol() is used

On Wed, 29 Jan 2020 at 12:37, Mariusz Nowak notifications@github.com wrote:

but Symbol() causes the js parser in the tv to fail.

What error is thrown? To work properly it needs at least a ES5+ environment (it won’t work in ES3)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/medikoo/es6-symbol/issues/11?email_source=notifications&email_token=AABU35V7FMDWWDVHKA2NMGDRAF2CDA5CNFSM4BRRCDT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKHBLPY#issuecomment-579737023, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABU35XFBEGCNFFSXKP5CFDRAF2CDANCNFSM4BRRCDTQ .

Kind regards

Nikos Katsikanis

Read more comments on GitHub >

github_iconTop Results From Across the Web

If Safari on Mac doesn't open a webpage or isn't working as ...
A webpage is blank, doesn't show all of its content, or doesn't work as expected; You can't sign in to a webpage, despite...
Read more >
Yosemite 10.10.1 causing Safari not to pl…
Last night I updated Yosemite to 10.10.1 and now all of a sudden Safari Version 8.0 (10600.1.25.1) won't play any YouTube videos.
Read more >
Update to the latest version of Safari
If a Safari update is available for your device, you can get it by updating or upgrading macOS, iOS, or iPadOS.
Read more >
Troubleshooting your Safari web extension
Enable the Safari web extension in macOS. Open Safari and choose Safari > Preferences. Select the Extensions tab, find your extension, and select...
Read more >
If AutoFill doesn't work in Safari on Mac
To turn AutoFill off, choose Safari > Settings, click AutoFill, then deselect the information you want to enter manually. See alsoUpdate contact information...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found