hyperapp-redux-devtools
Advanced tools
Comparing version 1.0.8 to 1.0.9
22
index.js
@@ -24,3 +24,3 @@ var { createStore } = require("redux"); | ||
var plugin = { | ||
var mixin = { | ||
actions: { | ||
@@ -32,3 +32,3 @@ replaceState: function(state) { | ||
events: { | ||
load: function(state, actions) { | ||
load: function(state, actions, root) { | ||
store = createStore(reducer, state, composeEnhancers()); | ||
@@ -39,7 +39,6 @@ store.subscribe(function() { | ||
}, | ||
action: function(state, actions, data, emit) { | ||
if (data.name !== "replaceState") { | ||
firedActions.push(data.name); | ||
action: function(state, actions, info) { | ||
if (info.name !== "replaceState") { | ||
firedActions.push(info.name); | ||
} | ||
return data; | ||
}, | ||
@@ -56,7 +55,12 @@ resolve(state, actions, result) { | ||
} | ||
return result; | ||
}, | ||
update: function(state, actions, data, emit) { | ||
update: function(state, actions, data) { | ||
if (firedActions.length > 0 && store !== undefined) { | ||
store.dispatch({ type: firedActions.pop(), payload: data }); | ||
var action = firedActions.pop(); | ||
if (action !== "replaceState") { | ||
store.dispatch({ type: action, payload: data }); | ||
} | ||
} | ||
return data; | ||
} | ||
@@ -66,4 +70,4 @@ } | ||
return plugin; | ||
return mixin; | ||
}; | ||
}; |
{ | ||
"name": "hyperapp-redux-devtools", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "hyperapp mixin to utilize redux-devtools-extension for time travel debugging capabilities", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
5972
63