diff options
author | Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> | 2017-07-18 07:19:02 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-07-18 00:19:02 +0200 |
commit | b11ac88692ad7a8765b0b15e6d7a882d171ffe81 (patch) | |
tree | e59594a654b0142a459fa62fb589682b62ef7f07 /app/javascript/packs/application.js | |
parent | 681c33d1f4c395742918eb66f2db979b0d628118 (diff) |
Require any modules after loading polyfill in entry points (#4231)
app/javascript/mastodon/main.js delayed the execution of modules, but other entry points didn't. That leads to failure in executing modules, which requires those polyfills. Strictly enforce the rule to require any modules after loading polyfill in entry points.
Diffstat (limited to 'app/javascript/packs/application.js')
-rw-r--r-- | app/javascript/packs/application.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index 63c5d6272..116632dea 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -1,6 +1,7 @@ -import main from '../mastodon/main'; import loadPolyfills from '../mastodon/load_polyfills'; -loadPolyfills().then(main).catch(e => { +loadPolyfills().then(() => { + require('../mastodon/main').default(); +}).catch(e => { console.error(e); }); |