add array type foundations (#2376)

This commit is contained in:
Bruce Martin
2021-08-12 07:17:05 -07:00
committed by GitHub
parent 59c475b821
commit 660dff256c
9 changed files with 103 additions and 65 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ import {
removeObsAnnoCategory,
addObsLayout,
} from "../util/stateManager/schemaHelpers";
import { isArrayOrTypedArray } from "../util/typeHelpers";
import { isAnyArray } from "../common/types/arraytypes";
import { _whereCacheCreate } from "./whereCache";
import AnnoMatrix from "./annoMatrix";
import PromiseLimit from "../util/promiseLimit";
@@ -134,7 +134,7 @@ export default class AnnoMatrixLoader extends AnnoMatrix {
const newAnnoMatrix = this._clone();
let data;
if (isArrayOrTypedArray(value)) {
if (isAnyArray(value)) {
if (value.constructor !== Ctor)
throw new Error("Mismatched value array type");
if (value.length !== this.nObs)