mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Use segment type
This commit is contained in:
parent
5d42f372f6
commit
c14e4f3eed
@ -43,7 +43,7 @@ export function createRouter({history, navigation}) {
|
||||
return new URLRouter(history, navigation, parseUrlPath, stringifyPath);
|
||||
}
|
||||
|
||||
function allowsChild(parent: {type: string, value: any} | undefined, child: {type: string, value: any}): boolean {
|
||||
function allowsChild(parent: Segment<SegmentType> | undefined, child: Segment<SegmentType>): boolean {
|
||||
const {type} = child;
|
||||
switch (parent?.type) {
|
||||
case undefined:
|
||||
|
Loading…
Reference in New Issue
Block a user