Non-Firefox fix

This commit is contained in:
ポール ウェッブ 2018-10-03 11:53:46 -05:00
parent d6bb92bf33
commit 1531851c25

View file

@ -17,8 +17,10 @@ document.addEventListener("DOMContentLoaded", () => {
// Browsers not Firefox do not yet support `text-orientation` and/or `writing-mode`
if (!/Firefox[/\s](\d+\.\d+)/.test(navigator.userAgent))
document.querySelector(".component--glossary-toc-toggle").classList.add("noncompliant-fix");
if (
!/Firefox[/\s](\d+\.\d+)/.test(navigator.userAgent) &&
document.querySelector(".component--glossary-toc-toggle")
) document.querySelector(".component--glossary-toc-toggle").classList.add("noncompliant-fix");