Skip to content

Commit c4b6260

Browse files
authored
fix: cannot set property $nuxt of #<Vue> which has only a getter (#116)
1 parent ccf4282 commit c4b6260

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/templates/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default {
3535
},
3636
created () {
3737
// Add this.$nuxt in child instances
38-
Vue.prototype.$nuxt = this
38+
this.$root.$options.$nuxt = this
3939
// Add to window so we can listen when ready
4040
if (typeof window !== 'undefined') {
4141
window.$nuxt = this

0 commit comments

Comments
 (0)