Skip to content

Commit 2f2683b

Browse files
p-spacekgorkem
authored andcommitted
fix:undefined error in mergingResult.problemArgs
1 parent 02d69fe commit 2f2683b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/languageservice/parser/jsonParser07.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ export class ValidationResult {
400400
(problemType !== ProblemType.missingRequiredPropWarning || isArrayEqual(p.problemArgs, bestResult.problemArgs)) // missingProp is merged only with same problemArg
401401
);
402402
if (mergingResult) {
403-
if (mergingResult.problemArgs.length) {
403+
if (mergingResult.problemArgs?.length) {
404404
mergingResult.problemArgs
405405
.filter((p) => !bestResult.problemArgs.includes(p))
406406
.forEach((p) => bestResult.problemArgs.push(p));

0 commit comments

Comments
 (0)