From 2b02655a3f420ddf08015e7c048d4eda12290d1d Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 6 Apr 2018 22:15:31 +0900 Subject: Fix bug --- src/remote/activitypub/resolve-person.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/remote/activitypub') diff --git a/src/remote/activitypub/resolve-person.ts b/src/remote/activitypub/resolve-person.ts index 9cca50e416..39887ef776 100644 --- a/src/remote/activitypub/resolve-person.ts +++ b/src/remote/activitypub/resolve-person.ts @@ -24,7 +24,7 @@ export default async (value, verifier?: string) => { object.type !== 'Person' || typeof object.preferredUsername !== 'string' || !validateUsername(object.preferredUsername) || - (object.name != '' && !isValidName(object.name)) || + !isValidName(object.name == '' ? null : object.name) || !isValidDescription(object.summary) ) { throw new Error('invalid person'); -- cgit v1.2.3-freya