diff --git a/celery_progress/static/celery_progress/celery_progress.js b/celery_progress/static/celery_progress/celery_progress.js index 2277544..e0a58d9 100644 --- a/celery_progress/static/celery_progress/celery_progress.js +++ b/celery_progress/static/celery_progress/celery_progress.js @@ -75,7 +75,7 @@ var CeleryProgressBar = (function () { } else { onDataError(progressBarElement, progressBarMessageElement, "Data Error"); } - if (data.result) { + if (data.hasOwnProperty('result')) { onResult(resultElement, data.result); } } diff --git a/celery_progress/static/celery_progress/websockets.js b/celery_progress/static/celery_progress/websockets.js index 7f98d82..6dfb78f 100644 --- a/celery_progress/static/celery_progress/websockets.js +++ b/celery_progress/static/celery_progress/websockets.js @@ -48,7 +48,7 @@ var CeleryWebSocketProgressBar = (function () { } else { onTaskError(progressBarElement, progressBarMessageElement, data.result); } - if (data.result) { + if (data.hasOwnProperty('result')) { onResult(resultElement, data.result); } ProgressSocket.close();