From c19aa1956e4c77d245c79fe54a25a244dd188f3f Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Mon, 25 Nov 2024 16:40:23 +0100 Subject: [PATCH] WebGPU: Fix `navigator` usage. (#29965) --- examples/jsm/capabilities/WebGPU.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/jsm/capabilities/WebGPU.js b/examples/jsm/capabilities/WebGPU.js index 1d24de73d69756..459c3e0b629633 100644 --- a/examples/jsm/capabilities/WebGPU.js +++ b/examples/jsm/capabilities/WebGPU.js @@ -1,5 +1,4 @@ -let isAvailable = navigator.gpu !== undefined; - +let isAvailable = ( typeof navigator !== 'undefined' && navigator.gpu !== undefined ); if ( typeof window !== 'undefined' && isAvailable ) {