[fix] "undefined" in BMA watcher subject
This commit is contained in:
@@ -25,8 +25,12 @@ export function urlWatcher(conf: Conf, checkValidity: (data: any) => Promise<Url
|
|||||||
urlConf.name,
|
urlConf.name,
|
||||||
async () => {
|
async () => {
|
||||||
let interval: NodeJS.Timer;
|
let interval: NodeJS.Timer;
|
||||||
const res = await Axios.get(urlConf.address)
|
try {
|
||||||
await checkResult(res.data)
|
const res = await Axios.get(urlConf.address)
|
||||||
|
await checkResult(res.data)
|
||||||
|
} catch (e) {
|
||||||
|
throw new UrlWatcherError(e.message || e)
|
||||||
|
}
|
||||||
interval = setInterval(async () => {
|
interval = setInterval(async () => {
|
||||||
try {
|
try {
|
||||||
const res = await Axios.get(urlConf.address)
|
const res = await Axios.get(urlConf.address)
|
||||||
|
|||||||
Reference in New Issue
Block a user