Do not over-prune var data cache (#1198)

* Remove unused variables and imports

* Simplify conditional

* Fix typo

* Do not overprune var data cache

There is a bug in how the universe and world gene sets are constructed
and passed to `ControlsHelpers.pruneVarDataCache` that causes the var
data cache to be over-pruned. This commit fixes the issue.

Consider the following example from the node console:

```
❯ node
Welcome to Node.js v13.5.0.
Type ".help" for more information.
> new Set([1], [2], [3])
Set(1) { 1 }
```

What we really want is the set `Set(3) { 1, 2, 3 }`, which can be
constructed as:

```
> new Set([].concat([1], [2], [3]))
Set(3) { 1, 2, 3 }
```
This commit is contained in:
Matt Weiden
2020-03-05 18:04:14 -08:00
committed by GitHub
parent bddf66d62a
commit bdd69160e2
9 changed files with 13 additions and 22 deletions
+3 -3
View File
@@ -127,14 +127,14 @@ const doInitialDataLoad = () =>
Step 2 - load the minimum stuff required to display.
*/
await Promise.all([
layoutFetchAndLoad(dispatch, schema, universe),
varAnnotationFetchAndLoad(dispatch, schema, universe)
layoutFetchAndLoad(dispatch),
varAnnotationFetchAndLoad(dispatch, schema)
]);
/*
Step 3 - load everything else
*/
await obsAnnotationFetchAndLoad(dispatch, schema, universe);
await obsAnnotationFetchAndLoad(dispatch, schema);
dispatch({
type: "initial data load complete (universe exists)",