use default argument value
Some checks failed
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline failed
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/test Pipeline failed
Some checks failed
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline failed
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/test Pipeline failed
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
|
||||
* @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)}`);
|
||||
|
||||
|
|
Loading…
Reference in a new issue