;(function() {
  var div, body = document.body
  if (body.style.flex == null && document.body.style.webkitFlex == null) {
    div = document.createElement("div")
    div.className = "Error"
    div.innerHTML = "Your browser does not support Flexbox. Parts of this site may not appear as expected."
    body.insertBefore(div, body.firstChild)
  }
}())

;(function(body, div) {
  if (body.style.flex == null && body.style.webkitFlex == null) {
    div = document.createElement("div")
    div.className = "Error"
    div.innerHTML = "Your browser does not support Flexbox. Parts of this site may not appear as expected."
    body.insertBefore(div, body.firstChild)
  }
}(document.body))

Use local body reference instead of document.body.
Use local body reference instead of document.body.
