mirror of
https://github.com/zammad/zammad
synced 2026-05-24 09:48:36 +00:00
14 lines
377 B
TypeScript
14 lines
377 B
TypeScript
// Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/
|
|
|
|
import type { FormKitNode } from '@formkit/core'
|
|
|
|
const defaultEmptyValueString = (node: FormKitNode) => {
|
|
node.hook.input((payload, next) => {
|
|
if (payload === undefined || payload === null) {
|
|
return next('')
|
|
}
|
|
return next(payload)
|
|
})
|
|
}
|
|
|
|
export default defaultEmptyValueString
|