Skip to content

Commit

Permalink
Trim early
Browse files Browse the repository at this point in the history
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
  • Loading branch information
rwaldron committed Mar 16, 2016
1 parent 2e9c37b commit 4fa57bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/speaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]);
Expand Down

0 comments on commit 4fa57bd

Please # to comment.