Skip to content
Browse files

correcting addObject parameter check

  • Loading branch information...
1 parent d0dc0b6 commit f57076ffdb41b037a8c1390c387bf2f4469a5c3b @amaduki amaduki committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 publicFunctions/public.js
View
5 publicFunctions/public.js
@@ -20,8 +20,9 @@ jCanvaScript.addObject=function(name,parameters,drawfn,parent)
var i=0;
for(var key in parameters)
{
- this['_'+key]=args[i]||parameters[key];
- if(key=='color')this.color(args[i]||parameters[key]);
+ var parameter = (args[i] !== undefined)?args[i]:parameters[key];
+ this['_'+key]=parameter;
+ if(key=='color')this.color(parameter);
i++;
}
return this;

0 comments on commit f57076f

Please sign in to comment.
Something went wrong with that request. Please try again.