Static GitHub Issues

[2202] Component data's function called twice

prev: Why the html tag width cannot full screen when preview on mobile
next: Vendor is too big

Hello all.

Can you help me please ? The data function is called twice when I refresh the page.

Thanks

package.json ... "nuxt": "^1.0.0-rc11", ...

file index.vue

import Functions from '~/utils/Functions'

  export default {
    name: 'Testing',
    components: {},
    data: () => {
      return {
        test: Functions.test()
      }
    },
    methods: {},
    mounted () {}
  }

file ~/utils/Functions.js ...

test () {
  console.error('in data function')
}

...

Browser screenshot from 2017-11-23 08-29-14

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1943">#c1943</a>)</em></sub></div>