From 4b68bc9d02ef280871c56a32c4ae346a29b182a9 Mon Sep 17 00:00:00 2001 From: AkiraDev Date: Sat, 1 Jun 2024 16:20:49 -0700 Subject: [PATCH] navigator.platform is depricated --- src/root.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/root.tsx b/src/root.tsx index e151ff91..d238e95f 100755 --- a/src/root.tsx +++ b/src/root.tsx @@ -21,7 +21,8 @@ export default component$(() => { useQwikSpeak({ config, translationFn }); useOnDocument('load', $(() => { - if (navigator.platform.toUpperCase().indexOf('MAC') >= 0) { + let platform = navigator.userAgentData.platform || navigator.platform || 'unknown'; + if (platform.toUpperCase().indexOf('MAC') >= 0) { document.querySelectorAll('.scale-for-mac').forEach(function(element) { element.classList.add('macos-zoom-fix'); });