Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Handling undefined passed as the args to Smoke#printArguments

  • Loading branch information...
commit d89e91d013fc24972f581abeb666a65ba6bf9acd 1 parent 997f7f0
@kristopher kristopher authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/smoke.core.js
View
6 lib/smoke.core.js
@@ -4,11 +4,11 @@ Smoke = {
return (jQuery && jQuery.print) ? jQuery.print(v) : v.toString();
},
- printArguments: function(args) {
- var a = [];
+ printArguments: function(args) {
+ var args = (args || []), a = [];
for(var i = 0; i < args.length; i++) {
a.push(Smoke.print(args[i]));
}
- return '(' + a.join(', ') + ')';
+ return '(' + a.join(', ') + ')';
}
};
Please sign in to comment.
Something went wrong with that request. Please try again.