Caleydo/tdp_publicdb

Error in GeneSymbolDetector and IDTypeDetector with non-string values

thinkh opened this issue · 0 comments

  • Release number or git hash: v7.0.0
  • Web browser version and OS: Chrome 84
  • Environment (local or deployed): both

Steps to reproduce

  1. Upload a CSV or XSLX that contians boolean values

Observed behavior

Uncaught (in promise) TypeError: v.trim is not a function
    at Object.detectIDType (GeneSymbolDetector.ts:9)
    at valuetype_idtype.ts:98
    at Generator.next (<anonymous>)
    at fulfilled (tslib.es6.js:71)

if (!v || v.trim().length === 0) {
continue; //skip empty samples
}

Uncaught (in promise) TypeError: v.trim is not a function
    at Object.detectIDType (IDTypeDetector.ts:19)
    at valuetype_idtype.ts:98
    at Generator.next (<anonymous>)
    at fulfilled (tslib.es6.js:71)

if (v == null || v.trim().length === 0) {
continue; //skip empty samples
}

Expected behavior

The detectors should check for strings before using trim().