2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-05 16:42:29 +03: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
+1 -1
View File
@@ -35,7 +35,7 @@ const _setElementAttributes = (selector, styleProp, callback) => {
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`
})
}