Skip to content

Commit

Permalink
Update apps/router/src/hooks/custom/useTrimmedInput.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
kleysc and coderabbitai[bot] authored Jan 11, 2025
1 parent b97ffee commit c5f2d3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/router/src/hooks/custom/useTrimmedInput.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'react';

const cleanInput = (value: string) => value.trim();
const cleanInput = (value: string | undefined) => value?.trim() ?? '';

export const useTrimmedInput = (initialValue = '') => {
const [value, setValue] = useState(initialValue);
Expand Down

0 comments on commit c5f2d3d

Please sign in to comment.