File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -224,6 +224,7 @@ export class ArkErrors
224224 add ( error : ArkError ) : void {
225225 const existing = this . byPath [ error . propString ]
226226 if ( existing ) {
227+ // only add if it's not already in the errors collection
227228 if ( error === existing ) return
228229 // If the existing error is an error for a value constrained to "never",
229230 // then we don't want to intersect the error messages.
Original file line number Diff line number Diff line change @@ -257,9 +257,7 @@ export class Traversal {
257257
258258 if ( result instanceof ArkError ) {
259259 // if an ArkError was returned, ensure it has been added to errors
260- // (it may have already been added via ctx.error() within the morph)
261- // Only add if it's not already in the errors collection
262- if ( ! this . errors . includes ( result ) ) this . errors . add ( result )
260+ this . errors . add ( result )
263261
264262 // skip any remaining morphs at the current path
265263 break
You can’t perform that action at this time.
0 commit comments