Test property presence in |utils.defaults| using |in|

This is more correct than comparing to |undefined|.
redux
David Majda 12 years ago
parent d3d4ace153
commit c7481d4da1

@ -92,7 +92,7 @@ var utils = {
defaults: function(object, defaults) {
for (var key in defaults) {
if (object[key] === undefined) {
if (!(key in object)) {
object[key] = defaults[key];
}
}

Loading…
Cancel
Save