File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1251,19 +1251,22 @@ bot.dom.getOpacityNonIE_ = function(elem) {
1251
1251
*/
1252
1252
bot . dom . getParentNodeInComposedDom = function ( node ) {
1253
1253
var /**@type {Node }*/ parent = node . parentNode ;
1254
+
1254
1255
// Shadow DOM v1
1255
1256
if ( parent . shadowRoot && node . assignedSlot !== undefined ) {
1256
1257
// Can be null on purpose, meaning it has no parent as
1257
1258
// it hasn't yet been slotted
1258
- parent = node . assignedSlot ? node . assignedSlot . parentNode : null ;
1259
+ return node . assignedSlot ? node . assignedSlot . parentNode : null ;
1259
1260
}
1261
+
1260
1262
// Shadow DOM V0 (deprecated)
1261
1263
if ( node . getDestinationInsertionPoints ) {
1262
1264
var destinations = node . getDestinationInsertionPoints ( ) ;
1263
1265
if ( destinations . length > 0 ) {
1264
- parent = destinations [ destinations . length - 1 ] ;
1266
+ return destinations [ destinations . length - 1 ] ;
1265
1267
}
1266
1268
}
1269
+
1267
1270
return parent ;
1268
1271
} ;
1269
1272
You can’t perform that action at this time.
0 commit comments