* Assets * * When a vm is present (instance creation), we need to do * a three-way merge between constructor options, instance * options and parent options.
(parentVal, childVal)
| 1066 | * options and parent options. |
| 1067 | */ |
| 1068 | function mergeAssets (parentVal, childVal) { |
| 1069 | var res = Object.create(parentVal || null); |
| 1070 | return childVal |
| 1071 | ? extend(res, childVal) |
| 1072 | : res |
| 1073 | } |
| 1074 | |
| 1075 | config._assetTypes.forEach(function (type) { |
| 1076 | strats[type + 's'] = mergeAssets; |