File tree 1 file changed +10
-4
lines changed
addon/components/nav-stack
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -157,10 +157,12 @@ export default class NavStack extends Component {
157
157
@action
158
158
tearDownHammer ( ) {
159
159
let { hammer, gesture } = this ;
160
- gesture . unregister ( this , hammer . get ( 'pan' ) ) ;
161
- hammer . off ( 'pan' ) ;
162
- hammer . destroy ( ) ;
163
- this . hammer = null ;
160
+ if ( hammer ) {
161
+ gesture . unregister ( this , hammer . get ( 'pan' ) ) ;
162
+ hammer . off ( 'pan' ) ;
163
+ hammer . destroy ( ) ;
164
+ this . hammer = null ;
165
+ }
164
166
}
165
167
166
168
@action
@@ -169,6 +171,10 @@ export default class NavStack extends Component {
169
171
}
170
172
171
173
handleStackDepthChange ( isInitialRender ) {
174
+ if ( this . isDestroying || this . isDestroyed ) {
175
+ return ;
176
+ }
177
+
172
178
let stackItems = this . stackItems || [ ] ;
173
179
let stackDepth = stackItems . length ;
174
180
let rootComponentRef = stackItems [ 0 ] && stackItems [ 0 ] . component ;
You can’t perform that action at this time.
0 commit comments