Permalink
Browse files

Fix error for removing message

  • Loading branch information...
eherve committed Oct 14, 2013
1 parent afb231f commit 8ac43425ee642fa0ea9bf40926f1013310f471b0
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/flashMessages.js
  2. +1 −1 package.json
View
@@ -56,7 +56,7 @@ function addToFlash(flash, message) {
for (var index = 0; index < flash.length; ++index) {
if (flash[index] && flash[index].key == message.key) {
if (message.value != undefined) flash[index] = message;
- else flash.slice(index, 1);
+ else flash.splice(index, 1);
return;
}
}
View
@@ -1,7 +1,7 @@
{
"name": "flash-messages",
"description": "Flash messages support for ExpressJs.",
- "version": "0.0.3",
+ "version": "0.0.4",
"repository": {
"type": "git",
"url": "https://github.com/eherve/flash-messages.git"

0 comments on commit 8ac4342

Please sign in to comment.