Use null coalescing operator
This commit is contained in:
parent
a17b2ba1e5
commit
01a8ac25c9
1 changed files with 2 additions and 4 deletions
|
@ -480,13 +480,11 @@ export default class WidgetUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
static getWidgetName(app) {
|
static getWidgetName(app) {
|
||||||
if (!app || !app.name) return "";
|
return app?.name?.trim() || _t("Unknown App");
|
||||||
return app.name.trim() || _t("Unknown App");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static getWidgetDataTitle(app) {
|
static getWidgetDataTitle(app) {
|
||||||
if (!app || !app.data || !app.data.title) return "";
|
return app?.data?.title?.trim() || "";
|
||||||
return app.data.title.trim();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static editWidget(room, app) {
|
static editWidget(room, app) {
|
||||||
|
|
Loading…
Reference in a new issue