feat: add support for topic/auto-generated channels and fix minor parsing errors (#233)

* dev: add support for topic channels

* dev(parser): do not try to parse empty nodes

* dev: add support for auto-generated game channels
This commit is contained in:
LuanRT
2022-11-11 00:38:44 -03:00
committed by GitHub
parent 4c00f15f55
commit 3cbcd71a3a
20 changed files with 325 additions and 22 deletions

View File

@@ -10,12 +10,12 @@ class NavigatableText extends Text {
super(node);
// TODO: is this needed? Text now supports this itself
this.endpoint =
node.runs?.[0]?.navigationEndpoint ?
new NavigationEndpoint(node.runs[0].navigationEndpoint) :
node.navigationEndpoint ?
new NavigationEndpoint(node.navigationEndpoint) :
node.titleNavigationEndpoint ?
new NavigationEndpoint(node.titleNavigationEndpoint) : null;
node?.runs?.[0]?.navigationEndpoint ?
new NavigationEndpoint(node?.runs[0].navigationEndpoint) :
node?.navigationEndpoint ?
new NavigationEndpoint(node?.navigationEndpoint) :
node?.titleNavigationEndpoint ?
new NavigationEndpoint(node?.titleNavigationEndpoint) : null;
}
toJSON(): NavigatableText {