Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function jsonpatch({ body, uiSpecHandle, trigger, properties }) {
const patched = applyOperation(uiSpecHandle.get(), body.jsonPatch).newDocument;
if (patched.properties) {
delete patched.properties;
}
uiSpecHandle.onUpdate({
...patched,
metadata: body.metadata,
});
// no-op return here, should be handled by uiSpecHandle
return { properties };
}
applyOperation (op) {
monitor.applyOperation(this.state, op);
}