Skip to content

Commit

Permalink
use es5 only, as this file is not transpiled
Browse files Browse the repository at this point in the history
  • Loading branch information
macgyver committed Feb 7, 2020
1 parent 617fe0f commit 2a22a65
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/cmd/compile/_client-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
*/
function mountLegacyServices() {
Object.keys(window.modules)
.filter((key) => typeof key === 'string' && key.match(/\.legacy$/))
.forEach((key) => window.require(key));
.filter(function (key) {
return typeof key === 'string' && key.match(/\.legacy$/);
})
.forEach(function (key) {
return window.require(key);
});
}

function tryToMount(fn, el, name) {
Expand All @@ -24,8 +28,10 @@ function tryToMount(fn, el, name) {
*/
function mountComponentModules() {
Object.keys(window.modules)
.filter((key) => typeof key === 'string' && key.match(/\.client$/))
.forEach((key) => {
.filter(function (key) {
return typeof key === 'string' && key.match(/\.client$/);
})
.forEach(function (key) {
let controllerFn = window.require(key);

if (typeof controllerFn === 'function') {
Expand Down

0 comments on commit 2a22a65

Please sign in to comment.