@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.cjs CHANGED
@@ -1686,10 +1686,10 @@ function datePlusDays(today, days = 30) {
1686
1686
 
1687
1687
  // src/utilities/strapi-responses.ts
1688
1688
  function isStrapiAttributeError(result) {
1689
- return result.error.details.errors.length > 0;
1689
+ 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);
1690
1690
  }
1691
1691
  function isStrapiStandardError(result) {
1692
- 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;
1692
+ return "error" in result && "details" in result.error && typeof result.error.details === "object" && result.error.details !== null;
1693
1693
  }
1694
1694
  function validateAndClean(schema, input) {
1695
1695
  var _a, _b;