mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-26 00:02:09 +00:00
fix: search continuations should return a Search class
Why? To keep things consistent.
This commit is contained in:
@@ -8,9 +8,16 @@ class Button {
|
||||
|
||||
constructor(data) {
|
||||
this.text = new Text(data.text).toString();
|
||||
this.label = data.accessibility?.label || null;
|
||||
this.tooltip = data.tooltip || null;
|
||||
this.icon_type = data.icon?.iconType || null;
|
||||
|
||||
data.accessibility?.label &&
|
||||
(this.label = data.accessibility?.label);
|
||||
|
||||
data.tooltip &&
|
||||
(this.tooltip = data.tooltip);
|
||||
|
||||
data.icon?.iconType &&
|
||||
(this.icon_type = data.icon?.iconType);
|
||||
|
||||
this.endpoint = new NavigationEndpoint(data.navigationEndpoint || data.serviceEndpoint);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user