@sjcrh/proteinpaint-shared 2.132.1-2 → 2.133.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/terms.js +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-shared",
3
- "version": "2.132.1-2",
3
+ "version": "2.133.5",
4
4
  "description": "ProteinPaint code that is shared between server and client-side workspaces",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/terms.js CHANGED
@@ -178,7 +178,8 @@ export function getSampleType(term, ds) {
178
178
  if (term.type == 'samplelst') {
179
179
  const key = Object.keys(term.values)[0]
180
180
  const sampleId = term.values[key].list[0]?.sampleId
181
- if (sampleId) return ds.sampleId2Type.get(sampleId)
181
+ // sampleId2Type expects number as key
182
+ if (sampleId) return ds.sampleId2Type.get(Number(sampleId))
182
183
  else return DEFAULT_SAMPLE_TYPE
183
184
  }
184
185
  // samplelst or non dict terms