homebridge-broadlink-rm-pro
Version:
Broadlink RM plugin (including the mini and pro) for homebridge with AC Pro and TV features
17 lines (11 loc) • 326 B
JavaScript
const { TIMEOUT_CANCELLATION } = require('./errors')
const catchDelayCancelError = async (originalMethod) => {
let result
try {
result = await originalMethod()
} catch (err) {
if (err.message !== TIMEOUT_CANCELLATION) {throw err}
}
return result
}
module.exports = catchDelayCancelError