UNPKG

@mason-api/javascript-sdk

Version:

Mason component rendering library

16 lines (15 loc) 327 B
import _ from 'lodash'; import update from 'immutability-helper'; export default () => node => { if (node.p._function === 'submitForm') { // we should replace this with type=submit attribute return update(node, { p: { $merge: { type: 'submit', }, }, }); } return node; }