2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-05 16:42:29 +03:00

Improvement: harmonize usage of constants (#30285)

This commit is contained in:
Sparks
2020-03-09 16:26:29 +01:00
committed by GitHub
parent 7d8c7c4ba8
commit c47547cd09
4 changed files with 11 additions and 8 deletions
+3 -2
View File
@@ -25,6 +25,7 @@ const DATA_API_KEY = '.data-api'
const ClassName = {
ACTIVE: 'active',
BUTTON: 'btn',
DISABLED: 'disabled',
FOCUS: 'focus'
}
@@ -89,8 +90,8 @@ class Button {
if (triggerChangeEvent) {
if (input.hasAttribute('disabled') ||
rootElement.hasAttribute('disabled') ||
input.classList.contains('disabled') ||
rootElement.classList.contains('disabled')) {
input.classList.contains(ClassName.DISABLED) ||
rootElement.classList.contains(ClassName.DISABLED)) {
return
}