File tree Expand file tree Collapse file tree
addon/instance-initializers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,13 +11,17 @@ export function clearHtml() {
1111 if ( current ) {
1212 let endMarker = document . getElementById ( 'fastboot-body-end' ) ;
1313 let shoeboxNodes = document . querySelectorAll ( '[type="fastboot/shoebox"]' ) ;
14+ let shoeboxNodesArray = [ ] ; // Note that IE11 doesn't support more concise options like Array.from, so we have to do something like this
15+ for ( let i = 0 ; i < shoeboxNodes . length ; i ++ ) {
16+ shoeboxNodesArray . push ( shoeboxNodes [ i ] ) ;
17+ }
1418 let parent = current . parentElement ;
1519 let nextNode ;
1620 do {
1721 nextNode = current . nextSibling ;
1822 parent . removeChild ( current ) ;
1923 current = nextNode ;
20- } while ( nextNode && nextNode !== endMarker && ! Array . from ( shoeboxNodes ) . includes ( nextNode ) ) ;
24+ } while ( nextNode && nextNode !== endMarker && shoeboxNodesArray . indexOf ( nextNode ) < 0 ) ;
2125 parent . removeChild ( endMarker ) ;
2226 }
2327}
You can’t perform that action at this time.
0 commit comments