Remove unnecessary 'onlyVisibleForSource' (#2982)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-06-09 07:01:26 +03:00
1 parent 6044d08a74
commit 6677e22371
5 files changed
+17 -24

No files matched your search

@@ -106,7 +106,7 @@ export class HotbarEntityIcon extends React.Component<Props> {
};
const isActive = this.isActive(entity);
const isPersisted = this.isPersisted(entity);
const menuItems = this.contextMenu?.menuItems.filter((menuItem) => !menuItem.onlyVisibleForSource || menuItem.onlyVisibleForSource === entity.metadata.source);
const menuItems = this.contextMenu?.menuItems ?? [];
if (!isPersisted) {
menuItems.unshift({