* 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)
| 1062 | * options and parent options. |
| 1063 | */ |
| 1064 | function mergeAssets (parentVal, childVal) { |
| 1065 | var res = Object.create(parentVal || null); |
| 1066 | return childVal |
| 1067 | ? extend(res, childVal) |
| 1068 | : res |
| 1069 | } |
| 1070 | |
| 1071 | config._assetTypes.forEach(function (type) { |
| 1072 | strats[type + 's'] = mergeAssets; |