Skip to content

Commit d535e16

Browse files
authored
bugfix: fix window.navigator.userAgentData may be '{}' (videojs#8474)
1 parent f7b1e3d commit d535e16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/utils/browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export const TOUCH_ENABLED = Boolean(Dom.isReal() && (
154154

155155
const UAD = window.navigator && window.navigator.userAgentData;
156156

157-
if (UAD) {
157+
if (UAD && UAD.platform && UAD.brands) {
158158
// If userAgentData is present, use it instead of userAgent to avoid warnings
159159
// Currently only implemented on Chromium
160160
// userAgentData does not expose Android version, so ANDROID_VERSION remains `null`

0 commit comments

Comments
 (0)