@@ -20,8 +20,8 @@ export default class AnalyzeMenuComponent extends Vue {
20
20
incidentId : number | null = null ;
21
21
22
22
created ( ) {
23
- MyIncidents . Instance . subscribeOnSelectedIncident ( this . onIncidentSelected ) ;
24
- MyIncidents . Instance . subscribeOnListChanges ( this . onListChanged ) ;
23
+ MyIncidents . Instance . subscribeOnSelectedIncident ( x => this . onIncidentSelected ( x ) ) ;
24
+ MyIncidents . Instance . subscribeOnListChanges ( ( ) => this . onListChanged ( ) ) ;
25
25
MyIncidents . Instance . ready ( )
26
26
. then ( x => {
27
27
this . incidents = MyIncidents . Instance . myIncidents ;
@@ -61,7 +61,6 @@ export default class AnalyzeMenuComponent extends Vue {
61
61
if ( ! this . incidentId && this . incidents . length > 0 ) {
62
62
this . incidentId = this . incidents [ 0 ] . incidentId ;
63
63
MyIncidents . Instance . switchIncident ( this . incidentId ) ;
64
- this . $router . push ( { name : 'analyzeIncident' , params : { incidentId : this . incidentId . toString ( ) } } ) ;
65
64
}
66
65
}
67
66
@@ -70,12 +69,7 @@ export default class AnalyzeMenuComponent extends Vue {
70
69
this . title = '(Select an incident)' ;
71
70
this . incidentId = null ;
72
71
} else {
73
-
74
- // update URL
75
- if ( this . incidentId !== incident . incidentId ) {
76
- this . $router . push ( { name : 'analyzeIncident' , params : { incidentId : incident . incidentId . toString ( ) } } ) ;
77
- }
78
-
72
+ this . $router . push ( { name : 'analyzeIncident' , params : { incidentId : incident . incidentId . toString ( ) } } ) ;
79
73
this . title = incident . shortTitle ;
80
74
this . incidentId = incident . incidentId ;
81
75
}
@@ -92,6 +86,7 @@ export default class AnalyzeMenuComponent extends Vue {
92
86
} else {
93
87
var newIncidentId = parseInt ( value , 10 ) ;
94
88
if ( this . incidentId === newIncidentId ) {
89
+ console . log ( 'exiting' )
95
90
return ;
96
91
}
97
92
this . incidentId = newIncidentId ;
0 commit comments