yep, that looks like a typo to me. It should definitely be '''/flex/.test(testElem.style.display)'''