From 4fa57bd0af95d7e248dd5ce7100b9cd6c3206c44 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Wed, 16 Mar 2016 19:44:38 -0400 Subject: [PATCH] Trim early Signed-off-by: Rick Waldron --- lib/speaker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/speaker.js b/lib/speaker.js index cbe4063..df00dbd 100644 --- a/lib/speaker.js +++ b/lib/speaker.js @@ -75,14 +75,14 @@ Speaker.prototype.say = function(phrase) { // speaker.say(1); // Ensures: 0 -> "0" - phrase += ''; + phrase = String(phrase).trim(); // If the phrase is empty, nothing to do. if (!phrase) { return this; } - args.push(phrase.trim()); + args.push(phrase); } else { if (Array.isArray(phrase)) { // speaker.say(['Hello!', '-a', 10, '-p', 50 ]);