mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-25 07:42:11 +00:00
feat(parser): Add AlertWithButton (#486)
This commit is contained in:
@@ -6,6 +6,7 @@ import PlayerCaptionsTracklist from './classes/PlayerCaptionsTracklist.js';
|
||||
import PlayerLiveStoryboardSpec from './classes/PlayerLiveStoryboardSpec.js';
|
||||
import PlayerStoryboardSpec from './classes/PlayerStoryboardSpec.js';
|
||||
import Alert from './classes/Alert.js';
|
||||
import AlertWithButton from './classes/AlertWithButton.js';
|
||||
|
||||
import type { IParsedResponse, IRawResponse, RawData, RawNode } from './types/index.js';
|
||||
|
||||
@@ -310,7 +311,7 @@ export function parseResponse<T extends IParsedResponse = IParsedResponse>(data:
|
||||
parsed_data.overlay = overlay;
|
||||
}
|
||||
|
||||
const alerts = parseArray(data.alerts, Alert);
|
||||
const alerts = parseArray(data.alerts, [ Alert, AlertWithButton ]);
|
||||
if (alerts.length) {
|
||||
parsed_data.alerts = alerts;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user