We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ab5a10 commit 43e8d57Copy full SHA for 43e8d57
src/redux-devtools-extension.ts
@@ -49,7 +49,7 @@ export function logStateAction(
49
if (isEnableLog) {
50
const action = {
51
type: `${namespace}/${infos.actionName}`,
52
- params: infos.params,
+ params: filterParams(infos.params),
53
}
54
55
if (infos.state) {
@@ -59,3 +59,15 @@ export function logStateAction(
59
getDevTools().send(action, STATE)
60
61
62
+
63
+function filterParams(params: any): any {
64
+ if (params && typeof params === 'object') {
65
+ if (params instanceof Event) {
66
+ return `<<Event:${params.type}>>`
67
+ } else if (params.nativeEvent instanceof Event) {
68
+ return `<<SyntheticEvent:${params.nativeEvent.type}>>`
69
+ }
70
71
72
+ return params
73
+}
0 commit comments