slightlyoff / async-local-storage

Apache License 2.0
153 stars 13 forks source link

Most basic example doesn't work at all in Firefox (aka Aurora) 25.0a2 #5

Open peterbe opened 10 years ago

peterbe commented 10 years ago

Here's a screenshot from my console

Anyway, the solution, after some trial and error, was to instead of using async-local-storage.min.js I have to use async-local-storage-with-Promise.min.js and then it works.

It was my mistake for downloading the wrong .min.js file ultimately but I typed "Promise" on the console and it already existed. Apparently this is a built-in Promise function in Firefox that clearly works slightly differently.

Here's what the built-n Promise thing looks like in Firefox

Perhaps the right thing to do is to do something like:

if (!Promise.isThenable) { throw "Promise library not loaded" }