Skip to content

Update bootstrap-node.js to check for Array.isArray#165289

Merged
alexdima merged 2 commits intomicrosoft:mainfrom
MarkZuber:markzuber/bootstrapnodearray
Nov 7, 2022
Merged

Update bootstrap-node.js to check for Array.isArray#165289
alexdima merged 2 commits intomicrosoft:mainfrom
MarkZuber:markzuber/bootstrapnodearray

Conversation

@MarkZuber
Copy link
Contributor

Issue: #165288

As mentioned in the issue, we're seeing

[85180:1102/151514.317775:INFO:CONSOLE(231)] "%c  ERR color: #f33 [Extension Host] TypeError: Cannot read properties of null (reading 'length')
	at Module._resolveLookupPaths (/Users/zube/vscode-distro/out/bootstrap-node.js:83:38)
	at Module._resolveLookupPaths (/Users/zube/vscode-distro/out/bootstrap.js:84:18)
	at node_module._resolveLookupPaths (/Users/zube/vscode-distro/out/vs/workbench/api/node/extHostExtensionService.js:23:39)
	at Module._resolveFilename (node:internal/modules/cjs/loader:941:20)
	at o._resolveFilename (node:electron/js2c/utility_process_init:17:848)
	at Module._load (node:internal/modules/cjs/loader:832:27)

on the console at startup in our fork. Adding the Array.isArray() check resolves this issue from throwing the exception. It is also noted that this check is done in a similar block within bootstrap.js so this diff mimics that behavior.

@alexdima alexdima merged commit c90f36e into microsoft:main Nov 7, 2022
@alexdima alexdima added this to the November 2022 milestone Nov 7, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants