MCPcopy Create free account
hub / github.com/SAP/ui5-project / _findDuplicateError

Method _findDuplicateError

lib/validation/ValidationError.js:108–121  ·  view source on GitHub ↗
(error, errorIndex, errors)

Source from the content-addressed store, hash-verified

106 }
107
108 static _findDuplicateError(error, errorIndex, errors) {
109 const foundIndex = errors.findIndex(($) => {
110 if ($.instancePath !== error.instancePath) {
111 return false;
112 } else if ($.keyword !== error.keyword) {
113 return false;
114 } else if (JSON.stringify($.params) !== JSON.stringify(error.params)) {
115 return false;
116 } else {
117 return true;
118 }
119 });
120 return foundIndex !== errorIndex;
121 }
122
123 static filterErrors(allErrors) {
124 return allErrors.filter((error, i, errors) => {

Callers 1

filterErrorsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected