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