Skip to content

Commit

Permalink
fix(SubscribeButton): Parse endpoints using NavigationEndpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
LuanRT committed Nov 13, 2024
1 parent daa5a29 commit 126a66f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parser/classes/SubscribeButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ export default class SubscribeButton extends YTNode {
this.notification_preference_button = Parser.parseItem(data.notificationPreferenceButton, SubscriptionNotificationToggleButton);

if (Reflect.has(data, 'serviceEndpoints'))
this.service_endpoints = data.serviceEndpoints.map((endpoint: RawNode) => Parser.parseItem(endpoint, NavigationEndpoint));
this.service_endpoints = data.serviceEndpoints.map((endpoint: RawNode) => new NavigationEndpoint(endpoint));

if (Reflect.has(data, 'onSubscribeEndpoints'))
this.on_subscribe_endpoints = data.onSubscribeEndpoints.map((endpoint: RawNode) => Parser.parseItem(endpoint, NavigationEndpoint));
this.on_subscribe_endpoints = data.onSubscribeEndpoints.map((endpoint: RawNode) => new NavigationEndpoint(endpoint));

if (Reflect.has(data, 'onUnsubscribeEndpoints'))
this.on_unsubscribe_endpoints = data.onUnsubscribeEndpoints.map((endpoint: RawNode) => Parser.parseItem(endpoint, NavigationEndpoint));
this.on_unsubscribe_endpoints = data.onUnsubscribeEndpoints.map((endpoint: RawNode) => new NavigationEndpoint(endpoint));

if (Reflect.has(data, 'subscribedEntityKey'))
this.subscribed_entity_key = data.subscribedEntityKey;
Expand Down

0 comments on commit 126a66f

Please sign in to comment.