Skip to content

Commit 9b5e557

Browse files
committed
Create options.beforeCreate in order to push it in handlers and call it along with the other beforeCreate actions
1 parent caa8868 commit 9b5e557

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Diff for: src/lib/addProvide.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,10 @@ function addProvide (component, options) {
55

66
delete options.provide
77

8-
const originalBeforeCreate = component.beforeCreate
9-
component.beforeCreate = function beforeCreate () {
8+
options.beforeCreate = function vueTestUtilBeforeCreate () {
109
this._provided = typeof provide === 'function'
1110
? provide.call(this)
1211
: provide
13-
14-
if (originalBeforeCreate) {
15-
originalBeforeCreate.call(this)
16-
}
17-
18-
component.beforeCreate = originalBeforeCreate
1912
}
2013
}
2114

0 commit comments

Comments
 (0)