fix eslint error

This commit is contained in:
Michael Peters 2022-02-08 23:00:04 -06:00
parent 4f2ee4fbd7
commit 43814a0b6e

View File

@ -182,8 +182,8 @@ export class AutoVerifier<T> {
// @param lazyVerify: set to true to only verify if primaryResult returns null (useful for fetching resources since they can never change) // @param lazyVerify: set to true to only verify if primaryResult returns null (useful for fetching resources since they can never change)
// @param debug: print debug messages. This is useful if you (unfortunately) think there is a bug in this // @param debug: print debug messages. This is useful if you (unfortunately) think there is a bug in this
async fetchAndVerifyIfNeeded(lazyVerify = false, debug = false): Promise<T | null> { async fetchAndVerifyIfNeeded(lazyVerify = false, debug = false): Promise<T | null> {
// eslint-disable-next-line no-async-promise-executor
return await new Promise<T | null>( return await new Promise<T | null>(
// eslint-disable-next-line no-async-promise-executor
async (resolve: (result: T | null) => void, reject: (error: Error) => void) => { async (resolve: (result: T | null) => void, reject: (error: Error) => void) => {
let resolved = false; let resolved = false;
const fetchId = debug && `v#${this.verifierId} f#${uuid.v4()}`; const fetchId = debug && `v#${this.verifierId} f#${uuid.v4()}`;