mirror of https://github.com/tootsuite/mastodon
Catch import promise in application.js (#3041)
* fix(polyfil): Catch error from promise https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html * fix(catch): Error Make import promise catch a noop with commented out console.log for a debugging hint. * fix(eslint): Disable eslint console rule * fix(application): Use console errorpull/3092/head
parent
7c1f3f8163
commit
abe0d9421f
|
@ -3,7 +3,9 @@ import main from '../mastodon/main';
|
||||||
if (!window.Intl || !Object.assign || !Number.isNaN ||
|
if (!window.Intl || !Object.assign || !Number.isNaN ||
|
||||||
!window.Symbol || !Array.prototype.includes) {
|
!window.Symbol || !Array.prototype.includes) {
|
||||||
// load polyfills dynamically
|
// load polyfills dynamically
|
||||||
import('../mastodon/polyfills').then(main);
|
import('../mastodon/polyfills').then(main).catch(e => {
|
||||||
|
console.error(e) // eslint-disable-line no-console
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
main();
|
main();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue