Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 12x 12x 4x 8x | export default { hooks: { model: [ { handler(value, { context }) { const hasEnforceNumber = (typeof context.attributes.vfeNumber === 'string' ? true : context.attributes.vfeNumber) || (typeof context.attributes['vfe-number'] === 'string' ? true : context.attributes['vfe-number']) if (context.type === 'number' && typeof value === 'string' && hasEnforceNumber) { return +value } else { return value } }, }, ], }, } |