aboutsummaryrefslogtreecommitdiff
path: root/js/src/modal.js
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2021-10-09 21:49:49 +0300
committerXhmikosR <[email protected]>2022-01-29 13:25:30 +0200
commit0c3dfe104b520d6ce466f265bf60c6d74785972e (patch)
tree278d1f279237b31fdc373aa93fb539a923e00506 /js/src/modal.js
parent2964c12bb91b3a252aecbe1bc4041020e4efd622 (diff)
downloadbootstrap-0c3dfe104b520d6ce466f265bf60c6d74785972e.tar.xz
bootstrap-0c3dfe104b520d6ce466f265bf60c6d74785972e.zip
Remove a few unneeded variables
Diffstat (limited to 'js/src/modal.js')
-rw-r--r--js/src/modal.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/js/src/modal.js b/js/src/modal.js
index cc158d6ce..e06cf7516 100644
--- a/js/src/modal.js
+++ b/js/src/modal.js
@@ -279,23 +279,22 @@ class Modal extends BaseComponent {
return
}
- const { classList, scrollHeight, style } = this._element
- const isModalOverflowing = scrollHeight > document.documentElement.clientHeight
- const initialOverflowY = style.overflowY
+ const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight
+ const initialOverflowY = this._element.style.overflowY
// return if the following background transition hasn't yet completed
- if (initialOverflowY === 'hidden' || classList.contains(CLASS_NAME_STATIC)) {
+ if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) {
return
}
if (!isModalOverflowing) {
- style.overflowY = 'hidden'
+ this._element.style.overflowY = 'hidden'
}
- classList.add(CLASS_NAME_STATIC)
+ this._element.classList.add(CLASS_NAME_STATIC)
this._queueCallback(() => {
- classList.remove(CLASS_NAME_STATIC)
+ this._element.classList.remove(CLASS_NAME_STATIC)
this._queueCallback(() => {
- style.overflowY = initialOverflowY
+ this._element.style.overflowY = initialOverflowY
}, this._dialog)
}, this._dialog)