mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
fix(nav): remove incorrectly used removeStart as a starting index in for loop. Fixes #8442
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
@ -486,6 +486,13 @@ export abstract class NavController {
|
||||
*/
|
||||
abstract length(): number;
|
||||
|
||||
|
||||
/**
|
||||
* Returns the current stack of views in this nav controller.
|
||||
* @returns {Array<ViewController>} the stack of view controllers in this nav controller.
|
||||
*/
|
||||
abstract getViews(): Array<ViewController>;
|
||||
|
||||
/**
|
||||
* Returns the active child navigation.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user