maybe fix boolean logic for cache

This commit is contained in:
Adam Hathcock
2025-09-18 15:05:10 +01:00
parent f41719f7e6
commit 89fc312839
@@ -58,10 +58,11 @@ export class ObjectLoader2Factory {
) {
this.logger('Using DEBUG mode for ObjectLoader2Factory')
}
if (
params.options?.useCache === true ||
getFeatureFlag(ObjectLoader2Flags.USE_CACHE) === 'true'
) {
const useCache = params.options?.useCache ?? true
const flag = getFeatureFlag(ObjectLoader2Flags.USE_CACHE)
const flagAllowsCache = flag !== 'false'
if (useCache && flagAllowsCache) {
database = new IndexedDatabase({
indexedDB: params.options?.indexedDB,
keyRange: params.options?.keyRange