From 77a8aa752e8379092e1072286fff518a53b52fb8 Mon Sep 17 00:00:00 2001 From: Ezra Brooks Date: Tue, 20 Feb 2024 18:54:56 -0700 Subject: [PATCH] global -> globalThis `global` doesn't exist in browsers but does in Node.js. `window` doesn't exist in Node.js but does exist in browsers. `globalThis` exists in both, acting as a proxy to the right one. --- src/RosLib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RosLib.js b/src/RosLib.js index d2806923e..66eceae80 100644 --- a/src/RosLib.js +++ b/src/RosLib.js @@ -18,7 +18,7 @@ import * as Tf from './tf/index.js'; import * as Urdf from './urdf/index.js'; // Add to global namespace for in-browser support (i.e. CDN) -global.ROSLIB = { +globalThis.ROSLIB = { REVISION, ...Core, ...ActionLib,