diff --git a/src/cursor/abstract_cursor.ts b/src/cursor/abstract_cursor.ts index eab9f55ae6..c84e314693 100644 --- a/src/cursor/abstract_cursor.ts +++ b/src/cursor/abstract_cursor.ts @@ -223,9 +223,16 @@ export abstract class AbstractCursor< this.cursorSession = this.cursorClient.startSession({ owner: this, explicit: false }); } + const enableUtf8Validation = options?.enableUtf8Validation; + let validation; + if (enableUtf8Validation === false) { + validation = { utf8: false }; + } else { + validation = { utf8: true }; + } this.deserializationOptions = { ...this.cursorOptions, - validation: parseUtf8ValidationOption(this.cursorOptions) + validation }; }