Skip to content

Commit

Permalink
mergeDefaults fails for null values
Browse files Browse the repository at this point in the history
Fixes katzer#72
  • Loading branch information
katzer committed Nov 10, 2014
1 parent 6560fb3 commit 45b4101
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions www/email_composer.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ exports.mergeWithDefaults = function (options) {
var custom_ = options[key],
default_ = defaults[key];

if (custom_ === null || custom_ === undefined) {
options[key] = default_;
continue;
}

if (typeof default_ != typeof custom_) {

if (typeof default_ == 'string') {
Expand Down

0 comments on commit 45b4101

Please sign in to comment.