mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-16 11:17:02 +02:00
Use null coalescing operator
This commit is contained in:
parent
a17b2ba1e5
commit
01a8ac25c9
@ -480,13 +480,11 @@ export default class WidgetUtils {
|
||||
}
|
||||
|
||||
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) {
|
||||
if (!app || !app.data || !app.data.title) return "";
|
||||
return app.data.title.trim();
|
||||
return app?.data?.title?.trim() || "";
|
||||
}
|
||||
|
||||
static editWidget(room, app) {
|
||||
|
Loading…
Reference in New Issue
Block a user