creativetimofficial / vuetify-material-dashboard

Vuetify Material Dashboard - Open Source Material Design Admin by Creative Tim
https://www.creative-tim.com/product/vuetify-material-dashboard
MIT License
1.32k stars 950 forks source link

resovle instead of resolve #18

Closed pcm0nk closed 4 years ago

pcm0nk commented 5 years ago

Hi guys thanks for the free version. is there any specific reason in router folder -> index.js @ line 22 && 24 is resovle instead of resolve

/**
 * Vue Router
 *
 * @library
 *
 * https://router.vuejs.org/en/
 */

// Lib imports
import Vue from 'vue'
import VueAnalytics from 'vue-analytics'
import Router from 'vue-router'
import Meta from 'vue-meta'

// Routes
import paths from './paths'

function route (path, view, name) {
  return {
    name: name || view,
    path,
    component: (resolve) => import(  //SHOULDNT BE  resolve ?
      `@/views/${view}.vue`
    ).then(resovle)
  }
}

Vue.use(Router)

// Create a new router
const router = new Router({
  mode: 'history',
  routes: paths.map(path => route(path.path, path.view, path.name)).concat([
    { path: '*', redirect: '/dashboard' }
  ]),
  scrollBehavior (to, from, savedPosition) {
    if (savedPosition) {
      return savedPosition
    }
    if (to.hash) {
      return { selector: to.hash }
    }
    return { x: 0, y: 0 }
  }
})

Vue.use(Meta)

// Bootstrap Analytics
// Set in .env
// https://github.com/MatteoGabriele/vue-analytics
if (process.env.GOOGLE_ANALYTICS) {
  Vue.use(VueAnalytics, {
    id: process.env.GOOGLE_ANALYTICS,
    router,
    autoTracking: {
      page: process.env.NODE_ENV !== 'development'
    }
  })
}

export default router

kinow commented 5 years ago

Probably a typo

https://github.com/creativetimofficial/vuetify-material-dashboard/pull/5

johnleider commented 4 years ago

Closing as resolved.