mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-12 03:35:30 +08:00
[Navigator] Port navigation APIs from Navigator to NavigationContext
This commit is contained in:
@@ -135,7 +135,7 @@ class RouteStack {
|
||||
);
|
||||
|
||||
var routes = this._routes.set(index, route);
|
||||
return this._update(this._index, routes);
|
||||
return this._update(index, routes);
|
||||
}
|
||||
|
||||
_update(index: number, routes: List): RouteStack {
|
||||
|
||||
@@ -201,7 +201,7 @@ describe('NavigationRouteStack:', () => {
|
||||
|
||||
expect(stack2).not.toBe(stack1);
|
||||
expect(stack2.toArray()).toEqual(['x', 'b']);
|
||||
expect(stack2.index).toBe(1);
|
||||
expect(stack2.index).toBe(0);
|
||||
});
|
||||
|
||||
it('replaces route at negative index', () => {
|
||||
|
||||
Reference in New Issue
Block a user