matfish2/vue-tables-2 + vuex = TypeError: Cannot set property 'outerHTML' of undefined
See original GitHub issueI’m running into this error where if I have a very simple basic table from https://github.com/matfish2/vue-tables-2 on a page, if I go to another page and click back, or if I just click a link that reloads the same page, I get the errors below.
The rest of my app works fine with turbolinks/vue-turbolinks
I do use vue on every page. I’m using the latest 2.0 version of vue-turbolinks
I noticed this error only happens with https://github.com/matfish2/vue-tables-2 but also only happens if I’m using the “vuex” mode for the server-side tables. If I switch off vuex, then I don’t get the error… I’m pretty confused what’s causing it but my app depends on using vuex server tables so hopefully you can give me some help fixing this problem
thanks!
TypeError: Cannot set property 'outerHTML' of undefined
at Vue$3.destroyed (index.js:24)
at callHook (vue.js:2872)
at Vue$3.Vue.$destroy (vue.js:2682)
at vuex.esm.js:567
at Array.<anonymous> (vue.js:1798)
at flushCallbacks (vue.js:1719)
at <anonymous>
logError @ vue.js:1702
globalHandleError @ vue.js:1693
handleError @ vue.js:1682
callHook @ vue.js:2874
Vue.$destroy @ vue.js:2682
(anonymous) @ vuex.esm.js:567
(anonymous) @ vue.js:1798
flushCallbacks @ vue.js:1719
Promise resolved (async)
microTimerFunc @ vue.js:1767
nextTick @ vue.js:1811
queueWatcher @ vue.js:3018
update @ vue.js:3153
notify @ vue.js:686
del @ vue.js:1069
(anonymous) @ vuex.esm.js:482
_withCommit @ vuex.esm.js:495
unregisterModule @ vuex.esm.js:480
webpackJsonp../node_modules/vue-tables-2/compiled/state/register-module.js.module.exports @ register-module.js:21
webpackJsonp../node_modules/vue-tables-2/compiled/mixins/created.js.module.exports @ created.js:10
created @ v-server-table.js:65
callHook @ vue.js:2872
Vue._init @ vue.js:4504
VueComponent @ vue.js:4674
createComponentInstanceForVnode @ vue.js:4195
init @ vue.js:4012
createComponent @ vue.js:5463
createElm @ vue.js:5411
createChildren @ vue.js:5534
createElm @ vue.js:5439
createChildren @ vue.js:5534
createElm @ vue.js:5439
patch @ vue.js:5928
Vue._update @ vue.js:2617
updateComponent @ vue.js:2745
get @ vue.js:3086
Watcher @ vue.js:3075
mountComponent @ vue.js:2749
./node_modules/vue/dist/vue.js.Vue$3.$mount @ vue.js:8322
./node_modules/vue/dist/vue.js.Vue$3.$mount @ vue.js:10661
init @ vue.js:4018
createComponent @ vue.js:5463
createElm @ vue.js:5411
createChildren @ vue.js:5534
createElm @ vue.js:5439
createChildren @ vue.js:5534
createElm @ vue.js:5439
createChildren @ vue.js:5534
createElm @ vue.js:5439
patch @ vue.js:5928
Vue._update @ vue.js:2617
updateComponent @ vue.js:2745
get @ vue.js:3086
Watcher @ vue.js:3075
mountComponent @ vue.js:2749
./node_modules/vue/dist/vue.js.Vue$3.$mount @ vue.js:8322
./node_modules/vue/dist/vue.js.Vue$3.$mount @ vue.js:10661
init @ vue.js:4018
createComponent @ vue.js:5463
createElm @ vue.js:5411
createChildren @ vue.js:5534
createElm @ vue.js:5439
createChildren @ vue.js:5534
createElm @ vue.js:5439
patch @ vue.js:5967
Vue._update @ vue.js:2617
updateComponent @ vue.js:2745
get @ vue.js:3086
Watcher @ vue.js:3075
mountComponent @ vue.js:2749
./node_modules/vue/dist/vue.js.Vue$3.$mount @ vue.js:8322
./node_modules/vue/dist/vue.js.Vue$3.$mount @ vue.js:10661
Vue._init @ vue.js:4514
Vue$3 @ vue.js:4599
(anonymous) @ app.js:49
t.dispatch @ turbolinks.js:5
t.Controller.r.notifyApplicationAfterPageLoad @ turbolinks.js:5
t.Controller.r.visitCompleted @ turbolinks.js:6
t.Visit.r.complete @ turbolinks.js:5
(anonymous) @ turbolinks.js:5
(anonymous) @ turbolinks.js:5
requestAnimationFrame (async)
t.Visit.r.render @ turbolinks.js:5
t.Visit.r.loadResponse @ turbolinks.js:5
t.BrowserAdapter.r.visitRequestCompleted @ turbolinks.js:5
t.Visit.r.requestCompletedWithResponse @ turbolinks.js:5
(anonymous) @ turbolinks.js:5
t.HttpRequest.r.endRequest @ turbolinks.js:5
t.HttpRequest.r.requestLoaded @ turbolinks.js:5
(anonymous) @ turbolinks.js:5
XMLHttpRequest.send (async)
(anonymous) @ VM57233:1
t.HttpRequest.r.send @ turbolinks.js:5
t.Visit.r.issueRequest @ turbolinks.js:5
t.BrowserAdapter.r.visitStarted @ turbolinks.js:5
t.Visit.r.start @ turbolinks.js:5
t.Controller.r.startVisit @ turbolinks.js:5
t.Controller.r.startVisitToLocationWithAction @ turbolinks.js:5
t.BrowserAdapter.r.visitProposedToLocationWithAction @ turbolinks.js:5
t.Controller.r.visit @ turbolinks.js:5
t.Controller.r.clickBubbled @ turbolinks.js:5
(anonymous) @ turbolinks.js:5
vue.js:580 [Vue warn]: Error in destroyed hook: "TypeError: Cannot set property 'outerHTML' of undefined"
(found in <Root>)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Cannot set property 'outerHTML' of null? - Stack Overflow
After the first time, the #png element no longer exists, so subsequent calls (like clicking the chart button) cause it to error.
Read more >Uncaught TypeError: Cannot set property 'itx' of undefined #929
On the Chrome, it throws an error "Uncaught TypeError: Cannot set property 'itx' of undefined" when I use "registerModule" to dynamically ...
Read more >Vuex "typeError cannot set property 'number' of undefined"
Hi guys i am new to Vue, i created a custom attribute on okta. I want to set it to the store upon...
Read more >Cannot set property 'outerHTML' of null JavaScript Error
Uncaught TypeError: Cannot set property 'outerHTML' of null JavaScript Error, this error will occur when trying to set the innerHTML, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just cut a release for 2.0.1 with this fix in it.
Awesome, that probably is something we should have been doing from the beginning.