diff options
author | XhmikosR <xhmikosr@gmail.com> | 2020-06-10 18:41:32 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2020-06-17 16:58:56 +0300 |
commit | 8debdf6ce6c944d58a53dfc0288e44a0598a0b1d (patch) | |
tree | 5d66c647dc10e403a843037e44cd85899c64899f /js | |
parent | 94a5d87e15092b090aff70d0bae88d2ff406076e (diff) |
Remove a couple of variables used once
Diffstat (limited to 'js')
-rw-r--r-- | js/src/alert.js | 6 | ||||
-rw-r--r-- | js/src/collapse.js | 3 |
2 files changed, 2 insertions, 7 deletions
diff --git a/js/src/alert.js b/js/src/alert.js index 03922e94c3..bc0edc6c0e 100644 --- a/js/src/alert.js +++ b/js/src/alert.js @@ -61,11 +61,7 @@ class Alert { // Public close(element) { - let rootElement = this._element - if (element) { - rootElement = this._getRootElement(element) - } - + const rootElement = element ? this._getRootElement(element) : this._element const customEvent = this._triggerCloseEvent(rootElement) if (customEvent === null || customEvent.defaultPrevented) { diff --git a/js/src/collapse.js b/js/src/collapse.js index 639369b017..be65529556 100644 --- a/js/src/collapse.js +++ b/js/src/collapse.js @@ -287,8 +287,7 @@ class Collapse { } _getDimension() { - const hasWidth = this._element.classList.contains(WIDTH) - return hasWidth ? WIDTH : HEIGHT + return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT } _getParent() { |