Skip to content

Commit 78d4c14

Browse files
committed
fix waitForData + data hook promise sugar
1 parent 5990758 commit 78d4c14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pipeline.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,13 @@ function loadData (component, transition, hook, cb, cleanup) {
274274
})
275275
if (!promises.length) {
276276
component.$loadingRouteData = false
277+
cb && cb()
277278
} else {
278279
promises[0].constructor.all(promises).then(_ => {
279280
component.$loadingRouteData = false
281+
cb && cb()
280282
}, onError)
281283
}
282-
cb && cb(data)
283284
}, {
284285
cleanup: cleanup,
285286
expectData: true

0 commit comments

Comments
 (0)