1
1
diff --git a/node_modules/@react-navigation/native/lib/module/createMemoryHistory.js b/node_modules/@react-navigation/native/lib/module/createMemoryHistory.js
2
- index 474db5e..b3167bc 100644
2
+ index 474db5e..4d94ed8 100644
3
3
--- a/node_modules/@react-navigation/native/lib/module/createMemoryHistory.js
4
4
+++ b/node_modules/@react-navigation/native/lib/module/createMemoryHistory.js
5
- @@ -1,6 +1,7 @@
5
+ @@ -1,10 +1,27 @@
6
6
"use strict";
7
7
8
8
import { nanoid } from 'nanoid/non-secure';
9
9
+ import { findFocusedRouteKey } from "./findFocusedRouteKey.js";
10
10
export function createMemoryHistory() {
11
11
let index = 0;
12
12
let items = [];
13
- @@ -17,7 +18,10 @@ export function createMemoryHistory() {
13
+
14
+ + // const log = () => {
15
+ + // console.log(JSON.stringify({
16
+ + // index,
17
+ + // indexGetter: history.index,
18
+ + // items: items.map((item, i) => {
19
+ + // var _item$state;
20
+ + // return {
21
+ + // selected: history.index === i ? '<<<<<<<' : undefined,
22
+ + // path: item.path,
23
+ + // id: item.id,
24
+ + // state: ((_item$state = item.state) === null || _item$state === void 0 ? void 0 : _item$state.key) || null
25
+ + // };
26
+ + // })
27
+ + // }, null, 4));
28
+ + // };
29
+ +
30
+ // Pending callbacks for `history.go(n)`
31
+ // We might modify the callback stored if it was interrupted, so we have a ref to identify it
32
+ const pending = [];
33
+ @@ -17,7 +34,10 @@ export function createMemoryHistory() {
14
34
it.cb = () => cb(true);
15
35
});
16
36
};
@@ -22,7 +42,7 @@ index 474db5e..b3167bc 100644
22
42
get index() {
23
43
// We store an id in the state instead of an index
24
44
// Index could get out of sync with in-memory values if page reloads
25
- @@ -32,12 +36 ,13 @@ export function createMemoryHistory() {
45
+ @@ -32,12 +52 ,13 @@ export function createMemoryHistory() {
26
46
return items[index];
27
47
},
28
48
backIndex({
@@ -38,7 +58,7 @@ index 474db5e..b3167bc 100644
38
58
return i;
39
59
}
40
60
}
41
- @@ -77,7 +82 ,7 @@ export function createMemoryHistory() {
61
+ @@ -77,7 +98 ,7 @@ export function createMemoryHistory() {
42
62
43
63
// Need to keep the hash part of the path if there was no previous history entry
44
64
// or the previous history entry had the same path
@@ -47,14 +67,13 @@ index 474db5e..b3167bc 100644
47
67
const hash = pathWithHash.includes('#') ? '' : location.hash;
48
68
if (!items.length || items.findIndex(item => item.id === id) < 0) {
49
69
// There are two scenarios for creating an array with only one history record:
50
- @@ -211,6 +216 ,5 @@ export function createMemoryHistory() {
70
+ @@ -211,6 +232 ,5 @@ export function createMemoryHistory() {
51
71
return () => window.removeEventListener('popstate', onPopState);
52
72
}
53
73
};
54
74
- return history;
55
75
}
56
76
//# sourceMappingURL=createMemoryHistory.js.map
57
- \ No newline at end of file
58
77
diff --git a/node_modules/@react-navigation/native/lib/module/findFocusedRouteKey.js b/node_modules/@react-navigation/native/lib/module/findFocusedRouteKey.js
59
78
new file mode 100644
60
79
index 0000000..b996822
0 commit comments