Browse Source

Merge pull request #6684 from nocodb/nc-fix/excel-import

fix: convert cell value before calling isURL method to avoid unexpected error
pull/6704/head
աӄա 1 year ago committed by GitHub
parent
commit
48152893fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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) =>
colData.some((r: any) => {
const v = getColVal(r, col)
return v && isURL(v)
// convert to string since isURL only accepts string
// and cell data value can be number or any other types
return v && isURL(v.toString())
})
export const getColumnUIDTAndMetas = (colData: [], defaultType: string) => {

Loading…
Cancel
Save