Skip to content

Commit

Permalink
Merge pull request #231 from julijane/remove-foreach
Browse files Browse the repository at this point in the history
Replace the use of lodash forEach with ES2015 for...of
  • Loading branch information
DeepDiver1975 authored Sep 24, 2018
2 parents dcb38e4 + f47339a commit cf42270
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import Vue from 'vue';

const _forEach = require('lodash/forEach');
const _map = require('lodash/map');
const _flatten = require('lodash/flatten');

Expand Down Expand Up @@ -54,11 +53,11 @@ Axios.get('config.json').then(config => {
redirect : to => arguments[0].navItems[0].route
}];

_forEach(arguments, (app) => {
for (let app of arguments) {
if (app.routes) routes.push(app.routes);
if (app.plugins) plugins.push(app.plugins);
if (app.navItems) navItems.push(app.navItems);
})
}

const router = new VueRouter({
routes: _flatten(routes)
Expand Down

0 comments on commit cf42270

Please sign in to comment.