'use strict';


// 3rd-party
var _ = require('underscore');


////////////////////////////////////////////////////////////////////////////////


module.exports = function deepMerge(dst, src) {
  _.each(src, function (val, key) {
    if (!_.isObject(val)) {
      dst[key] = val;
      return;
    }

    deepMerge(dst[key] || (dst[key] = {}), val);
  });

  return dst;
};

@@ -235,22 +235,30 @@
 f (!
-_.isObject(val
+dst.hasOwnProperty(key
 )) %7B
@@ -301,16 +301,212 @@
 %0A    %7D%0A%0A
+    if (!_.isObject(dst%5Bkey%5D) && !_.isFunction(dst%5Bkey%5D)) %7B%0A      dst%5Bkey%5D = val;%0A      return;%0A    %7D%0A%0A    if (_.isFunction(val)) %7B%0A      dst%5Bkey%5D = deepMerge(val, dst%5Bkey%5D);%0A      return;%0A    %7D%0A%0A
     deep
@@ -523,27 +523,8 @@
 key%5D
- %7C%7C (dst%5Bkey%5D = %7B%7D)
 , va

Fix deepMerge