forked from mystiq/hydrogen-web
set promise polyfill before others
just in case
This commit is contained in:
parent
b1f9cfd972
commit
4d23529b68
1 changed files with 8 additions and 8 deletions
|
@ -15,6 +15,14 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// polyfills needed for IE11
|
// polyfills needed for IE11
|
||||||
|
import Promise from "../lib/es6-promise/index.js";
|
||||||
|
import {checkNeedsSyncPromise} from "./matrix/storage/idb/utils.js";
|
||||||
|
|
||||||
|
if (typeof window.Promise === "undefined") {
|
||||||
|
window.Promise = Promise;
|
||||||
|
// TODO: should be awaited before opening any session in the picker
|
||||||
|
checkNeedsSyncPromise();
|
||||||
|
}
|
||||||
import "core-js/stable";
|
import "core-js/stable";
|
||||||
import "regenerator-runtime/runtime";
|
import "regenerator-runtime/runtime";
|
||||||
import "mdn-polyfills/Element.prototype.closest";
|
import "mdn-polyfills/Element.prototype.closest";
|
||||||
|
@ -24,14 +32,6 @@ import "mdn-polyfills/Element.prototype.closest";
|
||||||
// it will also include the file supporting *all* the encodings,
|
// it will also include the file supporting *all* the encodings,
|
||||||
// weighing a good extra 500kb :-(
|
// weighing a good extra 500kb :-(
|
||||||
import "text-encoding";
|
import "text-encoding";
|
||||||
import {checkNeedsSyncPromise} from "./matrix/storage/idb/utils.js";
|
|
||||||
import Promise from "../lib/es6-promise/index.js";
|
|
||||||
|
|
||||||
if (typeof window.Promise === "undefined") {
|
|
||||||
window.Promise = Promise;
|
|
||||||
// TODO: should be awaited before opening any session in the picker
|
|
||||||
checkNeedsSyncPromise();
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: contribute this to mdn-polyfills
|
// TODO: contribute this to mdn-polyfills
|
||||||
if (!Element.prototype.remove) {
|
if (!Element.prototype.remove) {
|
||||||
|
|
Loading…
Reference in a new issue