Skip to content

Commit 100762d

Browse files
authored
Merge pull request #98 from nomic-ai/bugfix-selection-history
bugfix to selection history
2 parents 0f920ec + ffdfd58 commit 100762d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/deepscatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ class Scatterplot<T extends Tile> {
199199
if (params.useNameCache && params.name && this.selection_history.length > 0) {
200200
const old_version = this.selection_history.find((x) => x.name === params.name);
201201
// If we have a cached version, move the cached version to the end and return it.
202-
this.selection_history = [...this.selection_history.filter((x) => x.name !== params.name), old_version];
203202
if (old_version) {
203+
this.selection_history = [...this.selection_history.filter((x) => x.name !== params.name), old_version];
204204
return old_version.selection;
205205
}
206206
}

0 commit comments

Comments
 (0)