diff --git a/lib/flash.js b/lib/flash.js index a278bc1..d26776f 100644 --- a/lib/flash.js +++ b/lib/flash.js @@ -68,7 +68,7 @@ function _flash(type, msg) { msg.forEach(function(val){ (msgs[type] = msgs[type] || []).push(val); }); - return msgs[type].length; + return (msgs[type] = msgs[type] || []).length; } return (msgs[type] = msgs[type] || []).push(msg); } else if (type) {