From 9e7bfd83b83aad03b8b63d1d74068d279ecef428 Mon Sep 17 00:00:00 2001 From: Andreas Minnich Date: Thu, 26 Jan 2023 13:13:22 +0100 Subject: [PATCH] Add "validatorFor" to RecordTransformBuffer As otherwise it will ignore custom validators. --- packages/@orbit/indexeddb/src/indexeddb-cache.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/@orbit/indexeddb/src/indexeddb-cache.ts b/packages/@orbit/indexeddb/src/indexeddb-cache.ts index 8735139c..2ea1c09f 100644 --- a/packages/@orbit/indexeddb/src/indexeddb-cache.ts +++ b/packages/@orbit/indexeddb/src/indexeddb-cache.ts @@ -601,10 +601,11 @@ export class IndexedDBCache< */ protected _getTransformBuffer(): RecordTransformBuffer { if (this._transformBuffer === undefined) { - const { schema, keyMap } = this; + const { schema, keyMap, validatorFor } = this; this._transformBuffer = new SimpleRecordTransformBuffer({ schema, - keyMap + keyMap, + validatorFor }); } return this._transformBuffer;