mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-02 00:09:30 +01:00
Merge pull request #306586 from microsoft/copilot/fix-null-reference-error
Fix null crash in task schema fixReferences
This commit is contained in:
@@ -28,7 +28,7 @@ function fixReferences(literal: Record<string, unknown> | unknown[]) {
|
||||
}
|
||||
Object.getOwnPropertyNames(literal).forEach(property => {
|
||||
const value = literal[property];
|
||||
if (Array.isArray(value) || typeof value === 'object') {
|
||||
if (Array.isArray(value) || (typeof value === 'object' && value !== null)) {
|
||||
fixReferences(value as Record<string, unknown>);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user