I have a site I'm working on that works fine on Chrome for the desktop (Windows 8.1 and OS X Mavericks)
When I launch it on iOS 7 or Safari 7.0.2, I get an error in the console that says "Error loading route: checkIfLoggedIn"
the member that he indicates in the message is not a route, this is a method that returns a promise. When I debug ember code to understand what is going wrong, I find that it rejects the promise for the reason βCan't find the variable: Promiseβ
I cannot post the actual code from my site here, so I decided to create a script that reproduces the error, and I was able to come up with this:
http://jsfiddle.net/NQKvy/851/
This works fine on Chrome for the desktop (Windows 8.1 and OS X Mavericks), but on iOS 7 or Safari 7.0.2 the following error is thrown in the console "ReferenceError: cannot find the variable: Promise"
Anyone have any ideas why this is not working?
Repeat:
- I tested Chrome for Windows 8.1 and OS X Mavericks - it works
- I tested Chrome for iOS and it does not work.
- I tested Safari for iOS and OS X Mavericks and it does not work.
- I have not tested Android at all (I do not have access to any devices at the moment)
This makes me think this is a Safari bug, because (if I remember correctly) Chrome for iOS uses the Safari control to display the page, not Chromium
This is the code I use to generate the error:
App.ready = function() { var asdf = new Promise(function (resolve) { var i = 1; i++; resolve.call(this,i); }).then(function (result) { alert('I: ' + result); }); };
source share