From 750f89b6ce4030f0e4117a2ae90a1a9ca8414267 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Thu, 8 Jan 2026 22:56:39 +0100 Subject: [PATCH] docs: fix biuld for node 22 --- src/docs/client-shim.mjs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/docs/client-shim.mjs b/src/docs/client-shim.mjs index b1969900..dc87e8ca 100644 --- a/src/docs/client-shim.mjs +++ b/src/docs/client-shim.mjs @@ -60,10 +60,6 @@ window = { location: {search: ''}, Image: Function, document: document, - navigator: { - platform:'', - userAgent: '' - }, NodeList: Array, WebSocket: Object, localStorage: { @@ -81,7 +77,14 @@ window = { ENV: {id: ''}, IP: '', DOM +} +if (!global.navigator) { + // defined as getter since node 22 + window.navigator = { + platform:'', + userAgent: '' + } } Object.assign(global, window)