mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 17:37:14 +00:00
Merge pull request #1517 from awronski/dev
fix: compile error when using scrollBehavior
This commit is contained in:
commit
d29297fdfb
@ -24,7 +24,7 @@ uniqBy(_components, '_name').forEach((route) => { %>const <%= route._name %> = (
|
|||||||
<% }) %>
|
<% }) %>
|
||||||
|
|
||||||
<% if (router.scrollBehavior) { %>
|
<% if (router.scrollBehavior) { %>
|
||||||
const scrollBehavior = <%= serialize(router.scrollBehavior).replace('scrollBehavior(', 'function(') %>
|
const scrollBehavior = <%= serialize(router.scrollBehavior).replace('scrollBehavior(', 'function(').replace('function function', 'function') %>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
const scrollBehavior = (to, from, savedPosition) => {
|
const scrollBehavior = (to, from, savedPosition) => {
|
||||||
// SavedPosition is only available for popstate navigations.
|
// SavedPosition is only available for popstate navigations.
|
||||||
|
Loading…
Reference in New Issue
Block a user