Skip to content

Commit 16bf662

Browse files
committed
Fix crash when columns is undefined in hasFlexColumn
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
1 parent ef852da commit 16bf662

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/libs/SearchUIUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5768,8 +5768,8 @@ const FLEX_COLUMNS = new Set<string>([
57685768
CONST.SEARCH.TABLE_COLUMNS.TAX_RATE,
57695769
]);
57705770

5771-
function hasFlexColumn(columns: SearchColumnType[]): boolean {
5772-
return columns.some((col) => FLEX_COLUMNS.has(col));
5771+
function hasFlexColumn(columns?: SearchColumnType[]): boolean {
5772+
return !!columns?.some((col) => FLEX_COLUMNS.has(col));
57735773
}
57745774

57755775
export {

0 commit comments

Comments
 (0)