From bfdc32a9c3f80cf4535d66215d7c684dfd374ba6 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 22 Sep 2014 19:03:59 -0400 Subject: [PATCH] typo --- src/hotswap.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hotswap.js b/src/hotswap.js index 717c099052..b56beae22e 100644 --- a/src/hotswap.js +++ b/src/hotswap.js @@ -19,14 +19,14 @@ HotSwap.find = function(id) { } }; -HotSwap.replace = function(id, middleware) { +HotSwap.replace = function(id, router) { var idx = HotSwap.find(id); if (idx) { - delete stack[idx].handle; // Destroy the old middleware - stack[idx].handle = middleware; // Replace with the new one - winston.info('[hotswap] Middleware with id `' + id + '` replaced successfully'); + delete stack[idx].handle; // Destroy the old router + stack[idx].handle = router; // Replace with the new one + winston.info('[hotswap] Router with id `' + id + '` replaced successfully'); } else { - winston.warn('[hotswap] Could not find middleware in stack with hotswapId `' + id + '`'); + winston.warn('[hotswap] Could not find router in stack with hotswapId `' + id + '`'); } };