@logux/vuex
Advanced tools
Comparing version 0.9.20 to 0.9.21
{ | ||
"name": "@logux/vuex", | ||
"version": "0.9.20", | ||
"version": "0.9.21", | ||
"description": "Vuex compatible API for Logux", | ||
@@ -27,3 +27,3 @@ "keywords": [ | ||
"@logux/core": "^0.6.2", | ||
"nanoevents": "^5.1.12" | ||
"nanoevents": "^5.1.13" | ||
}, | ||
@@ -38,2 +38,3 @@ "type": "module", | ||
"import": "./index.js", | ||
"default": "./index.js", | ||
"types": "./index.d.ts" | ||
@@ -45,3 +46,4 @@ }, | ||
"require": "./component/index.cjs", | ||
"import": "./component/index.js" | ||
"import": "./component/index.js", | ||
"default": "./component/index.js" | ||
}, | ||
@@ -51,18 +53,22 @@ "./composable/package.json": "./composable/package.json", | ||
"require": "./composable/index.cjs", | ||
"import": "./composable/index.js" | ||
"import": "./composable/index.js", | ||
"default": "./composable/index.js" | ||
}, | ||
"./inject/package.json": "./inject/package.json", | ||
"./inject": { | ||
"require": "./inject/index.cjs", | ||
"import": "./inject/index.js", | ||
"default": "./inject/index.js" | ||
}, | ||
"./store/package.json": "./store/package.json", | ||
"./store": { | ||
"require": "./store/index.cjs", | ||
"import": "./store/index.js" | ||
"import": "./store/index.js", | ||
"default": "./store/index.js" | ||
}, | ||
"./inject/package.json": "./inject/package.json", | ||
"./inject": { | ||
"require": "./inject/index.cjs", | ||
"import": "./inject/index.js" | ||
}, | ||
"./utils/package.json": "./utils/package.json", | ||
"./utils": { | ||
"require": "./utils/index.cjs", | ||
"import": "./utils/index.js" | ||
"import": "./utils/index.js", | ||
"default": "./utils/index.js" | ||
}, | ||
@@ -69,0 +75,0 @@ "./index.d.ts": "./index.d.ts" |
@@ -77,5 +77,6 @@ import { createStore as createVuexStore } from 'vuex' | ||
prevMeta = meta | ||
let prevState = deepCopy(store.state) | ||
let emit = 'change' in emitter.events | ||
let prevState = emit ? deepCopy(store.state) : undefined | ||
originCommit(action, commitOpts) | ||
emitter.emit('change', deepCopy(store.state), prevState, action, meta) | ||
emit && emitter.emit('change', deepCopy(store.state), prevState, action, meta) | ||
saveHistory(meta) | ||
@@ -302,6 +303,9 @@ } | ||
if (!meta.commit) { | ||
let prevState = deepCopy(store.state) | ||
let emit = 'change' in emitter.events | ||
let prevState = emit ? deepCopy(store.state) : undefined | ||
process(action, meta).then(() => { | ||
let currentState = deepCopy(store.state) | ||
emitter.emit('change', currentState, prevState, action, meta) | ||
if (emit) { | ||
let currentState = deepCopy(store.state) | ||
emitter.emit('change', currentState, prevState, action, meta) | ||
} | ||
}) | ||
@@ -308,0 +312,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53321
1548
Updatednanoevents@^5.1.13