check tag type
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user