Browse Source

fix: convert cell value before calling isURL method to avoid unexpected error

pull/6684/head
Pranav C 1 year ago
parent
commit
8e1e6dac85
  1. 4
      packages/nc-gui/helpers/parsers/parserHelpers.ts

4
packages/nc-gui/helpers/parsers/parserHelpers.ts

@ -142,7 +142,9 @@ export const isEmailType = (colData: [], col?: number) =>
export const isUrlType = (colData: [], col?: number) => export const isUrlType = (colData: [], col?: number) =>
colData.some((r: any) => { colData.some((r: any) => {
const v = getColVal(r, col) const v = getColVal(r, col)
return v && isURL(v) // convert string to number since isURL only accepts string
// and cell data value can be number and other types
return v && isURL(v.toString())
}) })
export const getColumnUIDTAndMetas = (colData: [], defaultType: string) => { export const getColumnUIDTAndMetas = (colData: [], defaultType: string) => {

Loading…
Cancel
Save