@logux/vuex
Advanced tools
Comparing version 0.8.4 to 0.8.5
@@ -84,5 +84,6 @@ import { createNanoEvents } from 'nanoevents' | ||
prevMeta = meta | ||
let prevState = deepCopy(store.state) | ||
let emit = 'change' in emitter.events | ||
let prevState = emit ? deepCopy(store.state) : undefined | ||
originCommit(action, options) | ||
emitter.emit('change', deepCopy(store.state), prevState, action, meta) | ||
emit && emitter.emit('change', deepCopy(store.state), prevState, action, meta) | ||
saveHistory(meta) | ||
@@ -313,6 +314,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) | ||
} | ||
}) | ||
@@ -319,0 +323,0 @@ } |
{ | ||
"name": "@logux/vuex", | ||
"version": "0.8.4", | ||
"version": "0.8.5", | ||
"description": "Vuex compatible API for Logux", | ||
@@ -27,3 +27,3 @@ "keywords": [ | ||
"@logux/core": "^0.6.2", | ||
"nanoevents": "^5.1.11" | ||
"nanoevents": "^5.1.13" | ||
}, | ||
@@ -38,2 +38,3 @@ "type": "module", | ||
"import": "./index.js", | ||
"default": "./index.js", | ||
"types": "./index.d.ts" | ||
@@ -45,18 +46,22 @@ }, | ||
"require": "./component/index.cjs", | ||
"import": "./component/index.js" | ||
"import": "./component/index.js", | ||
"default": "./component/index.js" | ||
}, | ||
"./helpers/package.json": "./helpers/package.json", | ||
"./helpers": { | ||
"require": "./helpers/index.cjs", | ||
"import": "./helpers/index.js", | ||
"default": "./helpers/index.js" | ||
}, | ||
"./create-logux/package.json": "./create-logux/package.json", | ||
"./create-logux": { | ||
"require": "./create-logux/index.cjs", | ||
"import": "./create-logux/index.js" | ||
"import": "./create-logux/index.js", | ||
"default": "./create-logux/index.js" | ||
}, | ||
"./helpers/package.json": "./helpers/package.json", | ||
"./helpers": { | ||
"require": "./helpers/index.cjs", | ||
"import": "./helpers/index.js" | ||
}, | ||
"./install/package.json": "./install/package.json", | ||
"./install": { | ||
"require": "./install/index.cjs", | ||
"import": "./install/index.js" | ||
"import": "./install/index.js", | ||
"default": "./install/index.js" | ||
}, | ||
@@ -66,3 +71,4 @@ "./mixin/package.json": "./mixin/package.json", | ||
"require": "./mixin/index.cjs", | ||
"import": "./mixin/index.js" | ||
"import": "./mixin/index.js", | ||
"default": "./mixin/index.js" | ||
}, | ||
@@ -72,3 +78,4 @@ "./utils/package.json": "./utils/package.json", | ||
"require": "./utils/index.cjs", | ||
"import": "./utils/index.js" | ||
"import": "./utils/index.js", | ||
"default": "./utils/index.js" | ||
}, | ||
@@ -75,0 +82,0 @@ "./index.d.ts": "./index.d.ts" |
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
1670
56669
28
Updatednanoevents@^5.1.13