Remove old switchFallback code

This commit is contained in:
Behind The Math
2018-01-29 23:57:18 -05:00
committed by Robin North
parent 70f6383702
commit 5ec0ce09e1
3 changed files with 5 additions and 25 deletions

View File

@@ -25,10 +25,9 @@ module.exports = function(options) {
options.debug = options.debug || false
options.timeout = options.timeout || 0
// we cant replace body.outerHTML or head.outerHTML
// it create a bug where new body or new head are created in the dom
// if you set head.outerHTML, a new body tag is appended, so the dom get 2 body
// & it break the switchFallback which replace head & body
// We cant replace body.outerHTML or head.outerHTML.
// It creates a bug where a new body or head are created in the DOM.
// If you set head.outerHTML, a new body tag is appended, so the DOM has 2 body nodes, and vice versa
if (!options.switches.head) {
options.switches.head = defaultSwitches.switchElementsAlt
}