Pause button - check whether function is defined before calling it

This commit is contained in:
JeLuF 2022-12-11 02:49:49 +01:00
parent c568bca69e
commit 38951f5581

View File

@ -437,7 +437,7 @@
* @memberof Task
*/
async post(url, timeout=-1) {
if (typeof pauseClient != 'undefined' && pauseClient===true) {
if (typeof pauseClient != 'undefined' && pauseClient===true && typeof resumeClient === 'function') {
await resumeClient()
}
if(this.status !== TaskStatus.init && this.status !== TaskStatus.pending) {