Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Commit 4884612

Browse files
style(vuex-middleware): deconstruct payload directly
1 parent 2399d93 commit 4884612

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vuex-middleware.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import lib from './lib'
22

33
export default store => {
4-
store.subscribe((mutation, state) => {
5-
if (!mutation.payload || !mutation.payload.meta || !mutation.payload.meta.analytics) {
4+
store.subscribe(({ payload }) => {
5+
if (!payload || !payload.meta || !payload.meta.analytics) {
66
return
77
}
88

9-
const { analytics } = mutation.payload.meta
9+
const { analytics } = payload.meta
1010

1111
if (!Array.isArray(analytics)) {
1212
throw new Error('The "analytics" property needs to be an array')

0 commit comments

Comments
 (0)