File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1040
1040
1041
1041
var parentElm = targetElement . element . parentNode ;
1042
1042
while ( parentElm != null ) {
1043
- if ( parentElm . tagName . toLowerCase ( ) === 'body' ) break ;
1043
+ if ( ! parentElm . tagName || parentElm . tagName . toLowerCase ( ) === 'body' ) break ;
1044
1044
1045
1045
//fix The Stacking Contenxt problem.
1046
1046
//More detail: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Understanding_z_index/The_stacking_context
1112
1112
function _isFixed ( element ) {
1113
1113
var p = element . parentNode ;
1114
1114
1115
- if ( p . nodeName === 'HTML' ) {
1115
+ if ( ! p || p . nodeName === 'HTML' ) {
1116
1116
return false ;
1117
1117
}
1118
1118
1175
1175
overlayLayer . className = 'introjs-overlay' ;
1176
1176
1177
1177
//check if the target element is body, we should calculate the size of overlay layer in a better way
1178
- if ( targetElm . tagName . toLowerCase ( ) === 'body' ) {
1178
+ if ( ! targetElm . tagName || targetElm . tagName . toLowerCase ( ) === 'body' ) {
1179
1179
styleText += 'top: 0;bottom: 0; left: 0;right: 0;position: fixed;' ;
1180
1180
overlayLayer . setAttribute ( 'style' , styleText ) ;
1181
1181
} else {
You can’t perform that action at this time.
0 commit comments