forked from FoundKeyGang/FoundKey
use default argument value
This unifies the style with the other function in that file and fixes the lint "no-param-reassign".
This commit is contained in:
parent
11a6e706f4
commit
936cbf900b
1 changed files with 1 additions and 2 deletions
|
@ -39,7 +39,7 @@ export async function extractPollFromQuestion(source: string | IObject, resolver
|
||||||
* @param resolver Resolver to use
|
* @param resolver Resolver to use
|
||||||
* @returns true if updated
|
* @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;
|
const uri = typeof value === 'string' ? value : value.id;
|
||||||
|
|
||||||
// URIがこのサーバーを指しているならスキップ
|
// URIがこのサーバーを指しているならスキップ
|
||||||
|
@ -54,7 +54,6 @@ export async function updateQuestion(value: string | IObject, resolver?: Resolve
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
// resolve new Question object
|
// resolve new Question object
|
||||||
if (resolver == null) resolver = new Resolver();
|
|
||||||
const question = await resolver.resolve(value) as IQuestion;
|
const question = await resolver.resolve(value) as IQuestion;
|
||||||
apLogger.debug(`fetched question: ${JSON.stringify(question, null, 2)}`);
|
apLogger.debug(`fetched question: ${JSON.stringify(question, null, 2)}`);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue