diff --git a/lib/flash.js b/lib/flash.js index a278bc1..19466d5 100644 --- a/lib/flash.js +++ b/lib/flash.js @@ -2,8 +2,6 @@ * Module dependencies. */ var format = require('util').format; -var isArray = require('util').isArray; - /** * Expose `flash()` function on requests. @@ -64,7 +62,7 @@ function _flash(type, msg) { if (arguments.length > 2 && format) { var args = Array.prototype.slice.call(arguments, 1); msg = format.apply(undefined, args); - } else if (isArray(msg)) { + } else if (Array.isArray(msg)) { // replaced isArray with Array.isArray msg.forEach(function(val){ (msgs[type] = msgs[type] || []).push(val); });