Skip to content

Commit f241654

Browse files
committed
fix: nuxt 2 plugin syntax usage
1 parent b400160 commit f241654

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/plugin.nuxt2.client.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const sendVitals = to => webVitals({
1010
})
1111

1212
export default function (ctx) {
13-
const router = ctx.app?.router || ctx.$router
13+
const router = (ctx.app && ctx.app.router) || ctx.$router
1414
if (!router) { return }
1515
router.onReady((to) => {
1616
sendVitals(to)

0 commit comments

Comments
 (0)