Skip to content

Commit

Permalink
fixes #98 copies props from action
Browse files Browse the repository at this point in the history
  • Loading branch information
tur-nr committed Sep 12, 2017
1 parent 8444805 commit 025497d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dist/polymer-redux.html
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@
});
return originalAction.apply(undefined, args);
};

// Copy props from the original action to the proxy.
// see https://github.com/tur-nr/polymer-redux/issues/98
Object.keys(originalAction).forEach(function (prop) {
action[prop] = originalAction[prop];
});
}

return store.dispatch(action);
Expand Down
6 changes: 6 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ function PolymerRedux(store) {
});
return originalAction.apply(undefined, args);
};

// Copy props from the original action to the proxy.
// see https://github.com/tur-nr/polymer-redux/issues/98
Object.keys(originalAction).forEach(function (prop) {
action[prop] = originalAction[prop];
});
}

return store.dispatch(action);
Expand Down
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ export default function PolymerRedux(store) {
});
return originalAction(...args);
};

// Copy props from the original action to the proxy.
// see https://github.com/tur-nr/polymer-redux/issues/98
Object.keys(originalAction).forEach(prop => {
action[prop] = originalAction[prop];
});
}

return store.dispatch(action);
Expand Down

0 comments on commit 025497d

Please sign in to comment.