From 8fcc3905df58cc25d0ceb7b32f87d8f2999cded9 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 2 Jul 2021 00:05:22 +0200 Subject: [PATCH] && --- apps/remix-ide/src/app/panels/file-panel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/panels/file-panel.js b/apps/remix-ide/src/app/panels/file-panel.js index 4e4769baad..4374ab3a0d 100644 --- a/apps/remix-ide/src/app/panels/file-panel.js +++ b/apps/remix-ide/src/app/panels/file-panel.js @@ -105,7 +105,7 @@ module.exports = class Filepanel extends ViewPlugin { if (!item.name || !item.id) throw new Error('Item name and id is mandatory') if (!item.type && !item.path && !item.extension && !item.pattern) throw new Error('Invalid file matching criteria provided') if (this.registeredMenuItems.filter((o) => { - return o.id === item.id & o.name === item.name + return o.id === item.id && o.name === item.name }).length) throw new Error(`Action ${item.name} already exists on ${item.id}`) this.registeredMenuItems = [...this.registeredMenuItems, item] this.removedMenuItems = this.removedMenuItems.filter(menuItem => item.id !== menuItem.id)