From 4be3f484d0f3c4bd3944ccba7e5fa43ff4060785 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 28 Jun 2016 16:48:33 -0500 Subject: [PATCH] check tag type --- src/progress.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/progress.js b/src/progress.js index 8c486066f..f8d9d4680 100644 --- a/src/progress.js +++ b/src/progress.js @@ -22,7 +22,7 @@ var progress = { // We use -1 for percentage to indicate errors function set(tag, percent, message) { - assert(tag === exports.UPDATE || tag === exports.BACKUP); + assert.strictEqual(typeof tag, 'string'); assert.strictEqual(typeof percent, 'number'); assert.strictEqual(typeof message, 'string'); @@ -35,7 +35,7 @@ function set(tag, percent, message) { } function clear(tag) { - assert(tag === exports.UPDATE || tag === exports.BACKUP); + assert.strictEqual(typeof tag, 'string'); progress[tag] = null;