You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
localForage adapter - because of the angular promises implementation I use dist/localforage.nopromises.js
environment
browser at runtime: Internet Explorer (IE)
js-data files and vendor libraries packaged with browserify
js-data used in browser only
Problem: js-data fails in IE with "js-data requires a global Promise constructor!"
when using dist/localforage.nopromises.js - v1.3.0:
JavaScript runtime error: 'Promise' is undefined
at
// There might be a driver initialization in progress
// so wait for it to finish in order to avoid a possible
// race condition to set _dbInfo
var oldDriverSetDone = this._driverSet !== null ? this._driverSet['catch'](function () {
return Promise.resolve();
}) : Promise.resolve();
followed by:
"js-data requires a global Promise constructor!"
even when using dist/localforage.js - v1.3.0:
"js-data requires a global Promise constructor!"
odd: only fails in IE
The exact same setup works on Chrome and Safari.
The text was updated successfully, but these errors were encountered:
This is only an annoying warning (which I will remove in the future). This warning will be printed to the console if js-data can't find window.Promise, but it won't cause js-data to fail. If you're loading js-data-angular like this:
localforage.nopromises.js requires there to be window.Promise, which is why is failing in IE. localforage.nopromises.js is not going to figure out that it can use the $q service provided by Angular. I would recommend adding a polyfill to your environment.
Situation: js-data with localForage adapter
setup
environment
Problem: js-data fails in IE with "js-data requires a global Promise constructor!"
when using dist/localforage.nopromises.js - v1.3.0:
at
followed by:
even when using dist/localforage.js - v1.3.0:
odd: only fails in IE
The exact same setup works on Chrome and Safari.
The text was updated successfully, but these errors were encountered: