File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -400,10 +400,20 @@ function processState (instance) {
400
400
401
401
function processComputed ( instance ) {
402
402
return Object . keys ( instance . $options . computed || { } ) . map ( key => {
403
- return {
404
- type : 'computed' ,
405
- key,
406
- value : instance [ key ]
403
+ // use try ... catch here because some computed properties may
404
+ // throw error during its evaluation
405
+ try {
406
+ return {
407
+ type : 'computed' ,
408
+ key,
409
+ value : instance [ key ]
410
+ }
411
+ } catch ( e ) {
412
+ return {
413
+ type : 'computed' ,
414
+ key,
415
+ value : '(error during evaluation)'
416
+ }
407
417
}
408
418
} )
409
419
}
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ import VuexTab from './views/vuex/VuexTab.vue'
51
51
import { mapState } from ' vuex'
52
52
53
53
export default {
54
+ name: ' app' ,
54
55
components: {
55
56
components: ComponentsTab,
56
57
vuex: VuexTab,
Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ export default {
30
30
' activeEvent'
31
31
]),
32
32
sortedEventData () {
33
+ if (! this .activeEvent ) {
34
+ return {}
35
+ }
33
36
const data = this .isComplex
34
37
? this .getSortedEventData ()
35
38
: this .activeEvent .eventData
You can’t perform that action at this time.
0 commit comments