Skip to content

Commit 96fc1c0

Browse files
committed
update modal-manager.js
1 parent a3946ff commit 96fc1c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/modal/helpers/modal-manager.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,23 +159,23 @@ const ModalManager = /*#__PURE__*/ Vue.extend({
159159
// Adjust fixed content padding
160160
/* istanbul ignore next: difficult to test in JSDOM */
161161
selectAll(Selector.FIXED_CONTENT).forEach(el => {
162-
const actualPadding = getStyle(el, 'paddingRight')
162+
const actualPadding = getStyle(el, 'paddingRight') || ''
163163
setAttr(el, 'data-padding-right', actualPadding)
164164
setStyle(el, 'paddingRight', `${toFloat(getCS(el).paddingRight, 0) + scrollbarWidth}px`)
165165
body._paddingChangedForModal.push(el)
166166
})
167167
// Adjust sticky content margin
168168
/* istanbul ignore next: difficult to test in JSDOM */
169169
selectAll(Selector.STICKY_CONTENT).forEach(el => /* istanbul ignore next */ {
170-
const actualMargin = getStyle(el, 'marginRight')
170+
const actualMargin = getStyle(el, 'marginRight') || ''
171171
setAttr(el, 'data-margin-right', actualMargin)
172172
setStyle(el, 'marginRight', `${toFloat(getCS(el).marginRight, 0) - scrollbarWidth}px`)
173173
body._marginChangedForModal.push(el)
174174
})
175175
// Adjust <b-navbar-toggler> margin
176176
/* istanbul ignore next: difficult to test in JSDOM */
177177
selectAll(Selector.NAVBAR_TOGGLER).forEach(el => /* istanbul ignore next */ {
178-
const actualMargin = getStyle(el, 'marginRight')
178+
const actualMargin = getStyle(el, 'marginRight') || ''
179179
setAttr(el, 'data-margin-right', actualMargin)
180180
setStyle(el, 'marginRight', `${toFloat(getCS(el).marginRight, 0) + scrollbarWidth}px`)
181181
body._marginChangedForModal.push(el)

0 commit comments

Comments
 (0)