( variable: VariableWithUiFields | null | undefined )
| 211 | * @returns Sanitized variable object |
| 212 | */ |
| 213 | export function sanitizeVariable( |
| 214 | variable: VariableWithUiFields | null | undefined |
| 215 | ): Omit<VariableWithUiFields, 'validationError' | 'workflowId'> | null | undefined { |
| 216 | if (!variable || typeof variable !== 'object') return variable |
| 217 | const { validationError: _validationError, workflowId: _workflowId, ...rest } = variable |
| 218 | return rest |
| 219 | } |
| 220 | |
| 221 | /** |
| 222 | * Normalizes the variables structure to always be an object. |
no outgoing calls
no test coverage detected