(props)
| 27 | } |
| 28 | |
| 29 | function wrapEventHandlers(props) { |
| 30 | const newProps = Object.assign({}, props); |
| 31 | for (const [key, value] of Object.entries(props)) { |
| 32 | if (typeof value === "function") { |
| 33 | newProps[key] = makeJsonSafeEventHandler(value); |
| 34 | } |
| 35 | } |
| 36 | return newProps; |
| 37 | } |
| 38 | |
| 39 | function makeJsonSafeEventHandler(oldHandler) { |
| 40 | // Since we can't really know what the event handlers get passed we have to check if |
no test coverage detected