Skip to content

Commit

Permalink
fix:undefined error in mergingResult.problemArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
p-spacek authored and gorkem committed Oct 7, 2023
1 parent 02d69fe commit 2f2683b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/languageservice/parser/jsonParser07.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ export class ValidationResult {
(problemType !== ProblemType.missingRequiredPropWarning || isArrayEqual(p.problemArgs, bestResult.problemArgs)) // missingProp is merged only with same problemArg
);
if (mergingResult) {
if (mergingResult.problemArgs.length) {
if (mergingResult.problemArgs?.length) {
mergingResult.problemArgs
.filter((p) => !bestResult.problemArgs.includes(p))
.forEach((p) => bestResult.problemArgs.push(p));
Expand Down

0 comments on commit 2f2683b

Please sign in to comment.