✨ user avatar

This commit is contained in:
Flam3rboy
2021-05-30 01:44:15 +02:00
parent d61bbe8293
commit 3254c31e02
6 changed files with 28 additions and 22 deletions
+1 -2
View File
@@ -74,10 +74,9 @@ export function instanceOf(
): Boolean {
if (!ref) ref = { obj: null, key: "" };
if (!path) path = "body";
if (!type) return true; // no type was specified
try {
if (!type) return true; // no type was specified
if (value == null) {
if (optional) return true;
throw new FieldError("BASE_TYPE_REQUIRED", req.t("common:field.BASE_TYPE_REQUIRED"));