From f3517708ff34093a544c09d6f5f1ec806130d5cc Mon Sep 17 00:00:00 2001 From: LuanRT Date: Wed, 8 Mar 2023 17:43:20 -0300 Subject: [PATCH] fix(MultiMarkersPlayerBar): avoid observing undefined objects --- src/parser/classes/DecoratedPlayerBar.ts | 3 ++- src/parser/classes/MultiMarkersPlayerBar.ts | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/parser/classes/DecoratedPlayerBar.ts b/src/parser/classes/DecoratedPlayerBar.ts index e45c03179..842679d90 100644 --- a/src/parser/classes/DecoratedPlayerBar.ts +++ b/src/parser/classes/DecoratedPlayerBar.ts @@ -2,6 +2,7 @@ import Parser from '../index.js'; import { YTNode } from '../helpers.js'; import type Button from './Button.js'; import type MultiMarkersPlayerBar from './MultiMarkersPlayerBar.js'; +import type { RawNode } from '../index.js'; class DecoratedPlayerBar extends YTNode { static type = 'DecoratedPlayerBar'; @@ -9,7 +10,7 @@ class DecoratedPlayerBar extends YTNode { player_bar: MultiMarkersPlayerBar | null; player_bar_action_button: Button | null; - constructor(data: any) { + constructor(data: RawNode) { super(); this.player_bar = Parser.parseItem(data.playerBar); this.player_bar_action_button = Parser.parseItem