Permalink
Browse files

Overwrite properties when merging objects.

  • Loading branch information...
1 parent 2810969 commit d73ceae83e220f4ce100380818afe8a34c5e2beb @cyberhobo cyberhobo committed with dezfowler Nov 3, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 source/mxn.js
View
@@ -292,7 +292,7 @@ mxn.util = {
merge: function(oRecv, oGive){
for (var sPropName in oGive){
if (oGive.hasOwnProperty(sPropName)) {
- if(!oRecv.hasOwnProperty(sPropName)){
+ if(!oRecv.hasOwnProperty(sPropName) || typeof oRecv[sPropName] !== 'object'){
oRecv[sPropName] = oGive[sPropName];
}
else {

0 comments on commit d73ceae

Please sign in to comment.