From 936cbf900b7ad9ddce784cef465dd520062e8314 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Thu, 1 Dec 2022 20:32:57 +0100 Subject: [PATCH] use default argument value This unifies the style with the other function in that file and fixes the lint "no-param-reassign". --- packages/backend/src/remote/activitypub/models/question.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/backend/src/remote/activitypub/models/question.ts b/packages/backend/src/remote/activitypub/models/question.ts index 17811b13c..9c0a0c52e 100644 --- a/packages/backend/src/remote/activitypub/models/question.ts +++ b/packages/backend/src/remote/activitypub/models/question.ts @@ -39,7 +39,7 @@ export async function extractPollFromQuestion(source: string | IObject, resolver * @param resolver Resolver to use * @returns true if updated */ -export async function updateQuestion(value: string | IObject, resolver?: Resolver) { +export async function updateQuestion(value: string | IObject, resolver?: Resolver = new Resolver()) { const uri = typeof value === 'string' ? value : value.id; // URIがこのサーバーを指しているならスキップ @@ -54,7 +54,6 @@ export async function updateQuestion(value: string | IObject, resolver?: Resolve //#endregion // resolve new Question object - if (resolver == null) resolver = new Resolver(); const question = await resolver.resolve(value) as IQuestion; apLogger.debug(`fetched question: ${JSON.stringify(question, null, 2)}`);