From 42e7d205b29a5a6ef51277c27494bc1f54693dd4 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Wed, 12 Aug 2020 21:22:02 -0230 Subject: [PATCH] Fix no-dupe-else-if issues (#9208) See [`no-dupe-else-if`](https://eslint.org/docs/rules/no-dupe-else-if) for more information. This change enables `no-dupe-else-if` and fixes the issues raised by the rule. --- .eslintrc.js | 1 + ui/app/components/app/menu-droppo.js | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 4f366fbf6..1e051aa01 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -49,6 +49,7 @@ module.exports = { 'guard-for-in': 'error', 'implicit-arrow-linebreak': 'error', 'no-case-declarations': 'error', + 'no-dupe-else-if': 'error', 'no-empty': 'error', 'no-eq-null': 'error', 'no-global-assign': 'error', diff --git a/ui/app/components/app/menu-droppo.js b/ui/app/components/app/menu-droppo.js index 7ea66927b..79c22d8d8 100644 --- a/ui/app/components/app/menu-droppo.js +++ b/ui/app/components/app/menu-droppo.js @@ -37,8 +37,6 @@ export default class MenuDroppoComponent extends Component { if (isOpen) { this.outsideClickHandler = onClickOutside - } else if (isOpen) { - this.outsideClickHandler = null } }