UNPKG

@mason-api/javascript-sdk

Version:

Mason component rendering library

13 lines (11 loc) 282 B
import _ from 'lodash'; import update from 'immutability-helper'; export default () => (node) => { if (node.tag === 'textarea') { return update(node, { p: { $unset: ['defaultValue'] }, t: { $set: _.get(node.p, 'defaultValue', '') }, }); } return node; };