File: fix-node-detection.patch

package info (click to toggle)
node-xterm 5.3.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,404 kB
  • sloc: javascript: 2,388; sh: 344; python: 59; makefile: 15
file content (16 lines) | stat: -rw-r--r-- 514 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
From: xavier Guimard <yadd@debian.org>
Date: mars, 09 2026 07:39:06 +0100
Subject: [PATCH] Fix node.js detection with nodejs 22
Forwarded: not-needed

--- a/src/common/Platform.ts
+++ b/src/common/Platform.ts
@@ -3,7 +3,7 @@
  * @license MIT
  */
 
-export const isNode = (typeof navigator === 'undefined') ? true : false;
+export const isNode = (typeof window === 'undefined') ? true : false;
 const userAgent = (isNode) ? 'node' : navigator.userAgent;
 const platform = (isNode) ? 'node' : navigator.platform;