1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-26 06:44:35 +02:00

Use template literals instead of concatenation (#33497)

This commit is contained in:
Rohit Sharma
2021-03-30 11:27:05 +05:30
committed by GitHub
parent 8c3e6ebc6e
commit 5cc53a0ef0
3 changed files with 4 additions and 6 deletions

View File

@@ -474,7 +474,7 @@ class Modal extends BaseComponent {
const actualValue = element.style[styleProp]
const calculatedValue = window.getComputedStyle(element)[styleProp]
Manipulator.setDataAttribute(element, styleProp, actualValue)
element.style[styleProp] = callback(Number.parseFloat(calculatedValue)) + 'px'
element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`
})
}