@koordinates/xstate-tree 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,18 +30,14 @@ export function handleLocationChange(routes, basePath, path, search, setActiveRo
|
|
|
30
30
|
route = route.parent;
|
|
31
31
|
}
|
|
32
32
|
setActiveRouteEvents([...routingEvents, match.event]);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const event = routingEvents.pop();
|
|
38
|
-
// copy the originalUrl to all parent events
|
|
39
|
-
event.originalUrl = match.event.originalUrl;
|
|
40
|
-
// @ts-ignore the event won't match GlobalEvents
|
|
41
|
-
broadcast(event);
|
|
42
|
-
}
|
|
33
|
+
while (routingEvents.length > 0) {
|
|
34
|
+
const event = routingEvents.pop();
|
|
35
|
+
// copy the originalUrl to all parent events
|
|
36
|
+
event.originalUrl = match.event.originalUrl;
|
|
43
37
|
// @ts-ignore the event won't match GlobalEvents
|
|
44
|
-
broadcast(
|
|
45
|
-
}
|
|
38
|
+
broadcast(event);
|
|
39
|
+
}
|
|
40
|
+
// @ts-ignore the event won't match GlobalEvents
|
|
41
|
+
broadcast(matchedEvent);
|
|
46
42
|
}
|
|
47
43
|
}
|
package/lib/testingUtilities.js
CHANGED
|
@@ -42,7 +42,7 @@ export const genericSlotsTestingDummy = new Proxy({}, {
|
|
|
42
42
|
export function buildViewProps(_view, props) {
|
|
43
43
|
return {
|
|
44
44
|
...props,
|
|
45
|
-
inState: (testState) => (state) => state === testState,
|
|
45
|
+
inState: (testState) => (state) => state === testState || testState.startsWith(state),
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
/**
|