-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37c5950
commit 3c841a1
Showing
1 changed file
with
1 addition
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,13 +15,6 @@ import deleteoptions from './delete-mounting-options' | |
import createFunctionalComponent from './create-functional-component' | ||
import { componentNeedsCompiling } from 'shared/validators' | ||
|
||
function extend (to: Object, _from: ?Object): Object { | ||
for (const key in _from) { | ||
to[key] = _from[key] | ||
} | ||
return to | ||
} | ||
|
||
export default function createInstance ( | ||
component: Component, | ||
options: Options, | ||
|
@@ -74,7 +67,7 @@ export default function createInstance ( | |
vm._renderProxy._t = function (name, feedback, props, bindObject) { | ||
const scopedSlotFn = vm.$_VueTestUtils_scopedSlots[name] | ||
if (scopedSlotFn) { | ||
props = extend(extend({}, bindObject), props) | ||
props = Object.assign(Object.assign({}, bindObject), props) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
38elements
Author
Contributor
|
||
vm._renderProxy.props = props | ||
return scopedSlotFn.call(vm._renderProxy) | ||
} else { | ||
|
You can use the spread operator here