File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -357,14 +357,8 @@ export const step = (level = 0) => {
357
357
// for now we only support negative numbers
358
358
level = Math . abs ( level )
359
359
360
- // we can't step back past the amount
361
- // of history entries
362
- if ( level > history . length ) {
363
- if ( isFunction ( app . _handleAppClose ) ) {
364
- return app . _handleAppClose ( )
365
- }
366
- return app . application . closeApp ( )
367
- } else if ( history . length ) {
360
+ //Check whether we have any history avaialble or not
361
+ if ( history . length ) {
368
362
// for now we only support history back
369
363
const route = history . splice ( history . length - level , level ) [ 0 ]
370
364
// store changed history
@@ -395,6 +389,15 @@ export const step = (level = 0) => {
395
389
}
396
390
}
397
391
}
392
+
393
+ // we can't step back past the amount
394
+ // of history entries
395
+ if ( level > history . length ) {
396
+ if ( isFunction ( app . _handleAppClose ) ) {
397
+ return app . _handleAppClose ( )
398
+ }
399
+ return app . application . closeApp ( )
400
+ }
398
401
return false
399
402
}
400
403
You can’t perform that action at this time.
0 commit comments