fix(nav): remove incorrectly used removeStart as a starting index in for loop. Fixes #8442

This commit is contained in:
Max Lynch
2016-10-08 20:22:11 -05:00
parent 88da70c386
commit 6496c7a996
2 changed files with 17 additions and 3 deletions

View File

@ -237,7 +237,7 @@ export class NavControllerBase extends Ion implements NavController {
this._queue.push(ti);
// if there isn't a transitoin already happening
// if there isn't a transition already happening
// then this will kick off this transition
this._nextTrns();
@ -287,8 +287,8 @@ export class NavControllerBase extends Ion implements NavController {
leavingRequiresTransition = (ti.removeStart + ti.removeCount === viewsLength);
for (var i = ti.removeStart; i <= ti.removeCount; i++) {
destroyQueue.push(this._views[i]);
for (var i = 0; i < ti.removeCount; i++) {
destroyQueue.push(this._views[i + ti.removeStart]);
}
for (var i = viewsLength - 1; i >= 0; i--) {
@ -914,6 +914,13 @@ export class NavControllerBase extends Ion implements NavController {
return this._views.length;
}
/**
* Return the stack of views in this NavController.
*/
getViews(): Array<ViewController> {
return this._views;
}
isSwipeBackEnabled(): boolean {
return this._sbEnabled;
}