Skip to content
Browse files

Fix bug where setOptions method ignored falsey properties on provided…

… options object.
  • Loading branch information...
1 parent 3a0e9aa commit 74dde83ea03d5d94d3e246f4c9ffbf37fee65a31 @bryanrsmith committed Mar 11, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 tinycon.js
View
4 tinycon.js
@@ -206,8 +206,8 @@
Tinycon.setOptions = function(custom){
options = {};
- for(var i in defaults){
- options[i] = custom[i] ? custom[i] : defaults[i];
+ for(var key in defaults){
+ options[key] = custom.hasOwnProperty(key) ? custom[key] : defaults[key];
}
return this;
};

0 comments on commit 74dde83

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