Static GitHub Issues

[723] scrollBehavior - Syntax Error: Unexpected token

prev: Vue nuxt js Hot code reloading not working
next: Property for Layouts

"nuxt": "^0.10.7" nuxt.config.js:

router: {
    scrollBehavior: function (to, from, savedPosition) {
      return { x: 0, y: 0 }
    }
  },

gives me:

ERROR  Failed to compile with 1 errors                                                 18:07:50

 error  in ./.nuxt/router.js

Syntax Error: Unexpected token, expected ( (23:32)

  21 |
  22 |
> 23 | const scrollBehavior = function function(to, from, savedPosition) {
     |                                 ^
  24 |       return { x: 0, y: 0 };
  25 |     }
  26 |

Thanks for help,

<!--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/c618">#c618</a>)</em></sub></div>