{"action":"created","issue":{"url":"https://api.github.com/repos/js-data/js-data/issues/265","labels_url":"https://api.github.com/repos/js-data/js-data/issues/265/labels{/name}","comments_url":"https://api.github.com/repos/js-data/js-data/issues/265/comments","events_url":"https://api.github.com/repos/js-data/js-data/issues/265/events","html_url":"https://github.com/js-data/js-data/issues/265","id":116089690,"number":265,"title":"Error \"js-data requires a global Promise constructor!\" in IE","user":{"login":"mobidev111","id":7082367,"avatar_url":"https://avatars.githubusercontent.com/u/7082367?v=3","gravatar_id":"","url":"https://api.github.com/users/mobidev111","html_url":"https://github.com/mobidev111","followers_url":"https://api.github.com/users/mobidev111/followers","following_url":"https://api.github.com/users/mobidev111/following{/other_user}","gists_url":"https://api.github.com/users/mobidev111/gists{/gist_id}","starred_url":"https://api.github.com/users/mobidev111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mobidev111/subscriptions","organizations_url":"https://api.github.com/users/mobidev111/orgs","repos_url":"https://api.github.com/users/mobidev111/repos","events_url":"https://api.github.com/users/mobidev111/events{/privacy}","received_events_url":"https://api.github.com/users/mobidev111/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/js-data/js-data/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-10T11:38:27Z","updated_at":"2016-01-06T08:35:05Z","closed_at":"2016-01-06T08:35:04Z","body":"### Situation: js-data with localForage adapter\r\n\r\nsetup\r\n* js-data\r\n* js-data-angular\r\n* localForage adapter - because of the angular promises implementation I use dist/localforage.nopromises.js\r\n\r\nenvironment\r\n* browser at runtime: Internet Explorer (IE)\r\n* js-data files and vendor libraries packaged with browserify\r\n* js-data used in browser only\r\n\r\n### Problem: js-data fails in IE with \"js-data requires a global Promise constructor!\"\r\n\r\n#### when using dist/localforage.nopromises.js - v1.3.0:\r\n```\r\nJavaScript runtime error: 'Promise' is undefined\r\n```\r\nat\r\n```\r\n// There might be a driver initialization in progress\r\n// so wait for it to finish in order to avoid a possible\r\n// race condition to set _dbInfo\r\nvar oldDriverSetDone = this._driverSet !== null ? this._driverSet['catch'](function () {\r\n  return Promise.resolve();\r\n}) : Promise.resolve();\r\n\r\n```\r\nfollowed by:\r\n```\r\n\"js-data requires a global Promise constructor!\"\r\n```\r\n\r\n#### even when using dist/localforage.js - v1.3.0:\r\n```\r\n\"js-data requires a global Promise constructor!\"\r\n```\r\n\r\n#### odd: only fails in IE\r\nThe exact same setup works on Chrome and Safari."},"comment":{"url":"https://api.github.com/repos/js-data/js-data/issues/comments/169266729","html_url":"https://github.com/js-data/js-data/issues/265#issuecomment-169266729","issue_url":"https://api.github.com/repos/js-data/js-data/issues/265","id":169266729,"user":{"login":"jmdobry","id":1213510,"avatar_url":"https://avatars.githubusercontent.com/u/1213510?v=3","gravatar_id":"","url":"https://api.github.com/users/jmdobry","html_url":"https://github.com/jmdobry","followers_url":"https://api.github.com/users/jmdobry/followers","following_url":"https://api.github.com/users/jmdobry/following{/other_user}","gists_url":"https://api.github.com/users/jmdobry/gists{/gist_id}","starred_url":"https://api.github.com/users/jmdobry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmdobry/subscriptions","organizations_url":"https://api.github.com/users/jmdobry/orgs","repos_url":"https://api.github.com/users/jmdobry/repos","events_url":"https://api.github.com/users/jmdobry/events{/privacy}","received_events_url":"https://api.github.com/users/jmdobry/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T08:35:04Z","updated_at":"2016-01-06T08:35:04Z","body":"Warning is no longer printed in v3. But, js-data is still dependent on `window.Promise` (or `global.Promise`)."}}