From b69c6a03b18ff9dd496368c58ae5db3fa1fafe08 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 28 Jun 2010 21:12:33 -0700 Subject: [PATCH] If not string, console.log should just print it without trying to format --- src/node.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node.js b/src/node.js index 9edc514af7c..fbcd41a6d38 100644 --- a/src/node.js +++ b/src/node.js @@ -194,6 +194,7 @@ process.openStdin = function () { function format (f) { var i = 1; var args = arguments; + if (!(f instanceof String)) return f; return f.replace(/%([sdf])/g, function (x) { switch (x) { case '%s': return args[i++];