feat/1053: added empty check on this.currentTask (#1054)

This commit is contained in:
rammohan-y authored and GitHub committed 2025-01-22 07:16:44 -05:00
1 parent ba282d775d
commit 16e044cabf
1 file changed
+1 -1
+1 -1
View File
@@ -2484,7 +2484,7 @@ Duration=${duration} `
res.send(200, {body: this.ep.local.sdp});
}
else {
if (this.currentTask.name === TaskName.Dial && this.currentTask.isOnHoldEnabled) {
if (this.currentTask && this.currentTask.name === TaskName.Dial && this.currentTask.isOnHoldEnabled) {
this.logger.info('onholdMusic reINVITE after media has been released');
await this.currentTask.handleReinviteAfterMediaReleased(req, res);
} else {