summaryrefslogtreecommitdiff
path: root/src/client/init.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/init.ts')
-rw-r--r--src/client/init.ts5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/client/init.ts b/src/client/init.ts
index 194ece886b..4d2170e03f 100644
--- a/src/client/init.ts
+++ b/src/client/init.ts
@@ -101,15 +101,12 @@ window.addEventListener('resize', () => {
});
//#endregion
-// Get the <head> element
-const head = document.getElementsByTagName('head')[0];
-
// If mobile, insert the viewport meta tag
if (isMobile || window.innerWidth <= 1024) {
const viewport = document.getElementsByName('viewport').item(0);
viewport.setAttribute('content',
`${viewport.getAttribute('content')},minimum-scale=1,maximum-scale=1,user-scalable=no`);
- head.appendChild(viewport);
+ document.head.appendChild(viewport);
}
//#region Set lang attr