()
| 260 | if (commit && touched) { |
| 261 | // This weird async wrapping is needed to use await in a react hook. |
| 262 | async function save() { |
| 263 | try { |
| 264 | setTouched(false); |
| 265 | await resource.save(store, store.getAgent()); |
| 266 | } catch (e) { |
| 267 | store.handleError(e); |
| 268 | } |
| 269 | } |
| 270 | save(); |
| 271 | } |
| 272 | }, [JSON.stringify(debounced)]); |
no test coverage detected