@@ -159,29 +159,29 @@ const ModalManager = /*#__PURE__*/ Vue.extend({
159
159
// Adjust fixed content padding
160
160
/* istanbul ignore next: difficult to test in JSDOM */
161
161
selectAll ( Selector . FIXED_CONTENT ) . forEach ( el => {
162
- const actualPadding = getStyle ( el , 'paddingRight' )
162
+ const actualPadding = getStyle ( el , 'paddingRight' ) || ''
163
163
setAttr ( el , 'data-padding-right' , actualPadding )
164
164
setStyle ( el , 'paddingRight' , `${ toFloat ( getCS ( el ) . paddingRight , 0 ) + scrollbarWidth } px` )
165
165
body . _paddingChangedForModal . push ( el )
166
166
} )
167
167
// Adjust sticky content margin
168
168
/* istanbul ignore next: difficult to test in JSDOM */
169
169
selectAll ( Selector . STICKY_CONTENT ) . forEach ( el => /* istanbul ignore next */ {
170
- const actualMargin = getStyle ( el , 'marginRight' )
170
+ const actualMargin = getStyle ( el , 'marginRight' ) || ''
171
171
setAttr ( el , 'data-margin-right' , actualMargin )
172
172
setStyle ( el , 'marginRight' , `${ toFloat ( getCS ( el ) . marginRight , 0 ) - scrollbarWidth } px` )
173
173
body . _marginChangedForModal . push ( el )
174
174
} )
175
175
// Adjust <b-navbar-toggler> margin
176
176
/* istanbul ignore next: difficult to test in JSDOM */
177
177
selectAll ( Selector . NAVBAR_TOGGLER ) . forEach ( el => /* istanbul ignore next */ {
178
- const actualMargin = getStyle ( el , 'marginRight' )
178
+ const actualMargin = getStyle ( el , 'marginRight' ) || ''
179
179
setAttr ( el , 'data-margin-right' , actualMargin )
180
180
setStyle ( el , 'marginRight' , `${ toFloat ( getCS ( el ) . marginRight , 0 ) + scrollbarWidth } px` )
181
181
body . _marginChangedForModal . push ( el )
182
182
} )
183
183
// Adjust body padding
184
- const actualPadding = getStyle ( body , 'paddingRight' )
184
+ const actualPadding = getStyle ( body , 'paddingRight' ) || ''
185
185
setAttr ( body , 'data-padding-right' , actualPadding )
186
186
setStyle ( body , 'paddingRight' , `${ toFloat ( getCS ( body ) . paddingRight , 0 ) + scrollbarWidth } px` )
187
187
}
0 commit comments