fix: search continuations should return a Search class

Why? To keep things consistent.
This commit is contained in:
LuanRT
2022-06-18 05:16:21 -03:00
parent 1d2c1ed69b
commit 4c7a42d8d4
9 changed files with 244 additions and 220 deletions

View File

@@ -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);
}
}