@sjcrh/proteinpaint-shared 2.132.0 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-shared",
3
- "version": "2.132.0",
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",
@@ -119,7 +119,7 @@ export function isUsableTerm(term, _usecase, termdbConfig, ds) {
119
119
  if (!term.isleaf) uses.add('branch')
120
120
  }
121
121
  return uses
122
- case 'eventCount':
122
+ case 'frequencyChart':
123
123
  if (usecase.detail == 'term') {
124
124
  if (term.type == 'date') {
125
125
  uses.add('plot')
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