(target, newOptions)
| 193 | } |
| 194 | |
| 195 | function resolveTargetOptions(target, newOptions) { |
| 196 | if (!newOptions) { |
| 197 | return; |
| 198 | } |
| 199 | let options = target.options; |
| 200 | if (!options) { |
| 201 | target.options = newOptions; |
| 202 | return; |
| 203 | } |
| 204 | if (options.$shared) { |
| 205 | // Going from shared options to distinct one: |
| 206 | // Create new options object containing the old shared values and start updating that. |
| 207 | target.options = options = Object.assign({}, options, {$shared: false, $animations: {}}); |
| 208 | } |
| 209 | return options; |
| 210 | } |