Use 'in' to be more idiomatic

This commit is contained in:
Danila Fedorin 2021-08-20 10:04:22 -07:00
parent 19bababa68
commit 94ff76711c

View file

@ -35,7 +35,7 @@ class QueryTargetWrapper<T> {
} }
get keyPath(): string | string[] { get keyPath(): string | string[] {
if (this._qt["objectStore"]) { if ("objectStore" in this._qt) {
return (this._qt as IDBIndex).objectStore.keyPath; return (this._qt as IDBIndex).objectStore.keyPath;
} else { } else {
return this._qt.keyPath; return this._qt.keyPath;