@getcommunity/gc-validators 0.0.88 → 0.0.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1664,10 +1664,10 @@ function datePlusDays(today, days = 30) {
1664
1664
 
1665
1665
  // src/utilities/strapi-responses.ts
1666
1666
  function isStrapiAttributeError(result) {
1667
- return result.error.details.errors.length > 0;
1667
+ return "error" in result && "details" in result.error && typeof result.error.details === "object" && result.error.details !== null && "errors" in result.error.details && Array.isArray(result.error.details.errors);
1668
1668
  }
1669
1669
  function isStrapiStandardError(result) {
1670
- return "error" in result && "details" in result.error && typeof result.error.details === "object" && result.error.details !== null && "errors" in result.error.details && result.error.details.errors !== void 0;
1670
+ return "error" in result && "details" in result.error && typeof result.error.details === "object" && result.error.details !== null;
1671
1671
  }
1672
1672
  function validateAndClean(schema, input) {
1673
1673
  var _a, _b;