diff --git a/docs/API/Arguments.md b/docs/API/Arguments.md index a9c0b99e..1da1c548 100644 --- a/docs/API/Arguments.md +++ b/docs/API/Arguments.md @@ -26,9 +26,11 @@ Use `window.__REDUX_DEVTOOLS_EXTENSION__([config])` or `window.__REDUX_DEVTOOLS_ ``` - **deserializeAction(action): transformedAction** (*function*) - optional transformation of actions deserialized from debug session (useful if actions are not plain object. Example: immutable-js action payload) - action, transformedAction - Redux action objects - - **serializeState** (*boolean or function or object*) - specify how and what should be handled during serialization (useful if state is not plain object). Could be: + - **serializeState** (*boolean or function or object*) - specify how and what should be handled during serialization (useful if state is not plain object). It will affect the extension's performance significantly! + Could be: + - `undefined` - use regular `JSON.stringify` to send data - the fast mode. - `false` - handle only circular references. - - `true` - handle also dates, regexes, undefined, error objects, and functions. + - `true` - handle also dates, regexes, undefined, error objects, symbols, and functions. - `function(key, value)` - JSON replacer. Example of usage with mori data structures: ```js diff --git a/src/app/api/index.js b/src/app/api/index.js index 4d24d0c5..42c9d03a 100644 --- a/src/app/api/index.js +++ b/src/app/api/index.js @@ -9,7 +9,8 @@ function stringify(obj, serialize) { } if (serialize === true) { return jsan.stringify(obj, function(key, value) { - if (value && value.toJS) { return value.toJS(); } + if (typeof value === 'object' && value.toJS) return value.toJS(); + if (typeof value === 'symbol') return String(value); return value; }, null, true); }