Skip to content

Commit

Permalink
fix: recordOf should throw when finding an element that is not a vali…
Browse files Browse the repository at this point in the history
…d token
  • Loading branch information
IamSebastianDev committed Feb 26, 2023
1 parent a89a105 commit fcddd77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/Validators/RecordFrom.validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ export const RecordFrom = (collection: string | Collection<Record<PropertyKey, u
return parsedNamespace === namespace && ObjectId.is(id);
}

return false;
throw new FlotsamValidationError(`Expected property '${propertyName}' to be a valid RecordLink.`);
};
};

0 comments on commit fcddd77

Please sign in to comment.