From 38951f55811b72f0ca7b1c2cfda643e2e6706906 Mon Sep 17 00:00:00 2001 From: JeLuF Date: Sun, 11 Dec 2022 02:49:49 +0100 Subject: [PATCH] Pause button - check whether function is defined before calling it --- ui/media/js/engine.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/media/js/engine.js b/ui/media/js/engine.js index ed5ed2d5..11d88e3b 100644 --- a/ui/media/js/engine.js +++ b/ui/media/js/engine.js @@ -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) {