Skip to content

global -> globalThis#689

Merged
EzraBrooks merged 1 commit intodevelopfrom
fix-global-typo
Feb 21, 2024
Merged

global -> globalThis#689
EzraBrooks merged 1 commit intodevelopfrom
fix-global-typo

Conversation

@EzraBrooks
Copy link
Copy Markdown
Contributor

@EzraBrooks EzraBrooks commented Feb 21, 2024

Public API Changes

Fixes a bug I introduced with usage of the global ROSLIB object.

Description

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 appropriate one.

Fixes a bug where importing roslib class-by-class works fine but importing the whole library in a browser application throws a ReferenceError.

`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.
@EzraBrooks EzraBrooks merged commit 253ae64 into develop Feb 21, 2024
@EzraBrooks EzraBrooks deleted the fix-global-typo branch February 21, 2024 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants