UNPKG

redux-act

Version:

An opinionated lib to create actions and reducers for Redux

10 lines (8 loc) 529 B
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } export default function asError(action) { if (_typeof(action) === 'object' && action !== null) { action.error = true; } return action; } ;