Skip to content

Commit

Permalink
Use stricter check for shared structure key, #270
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Mar 10, 2024
1 parent 4d1eb1a commit 7c8c903
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion open.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export function open(path, options) {
if (Encoder) {
this.encoder = new Encoder(Object.assign(
assignConstrainedProperties(['copyBuffers', 'getStructures', 'saveStructures', 'useFloat32', 'useRecords', 'structuredClone', 'variableMapSize', 'useTimestamp32', 'largeBigIntToFloat', 'encodeUndefinedAsNil', 'int64AsNumber', 'onInvalidDate', 'mapsAsObjects', 'useTag259ForMaps', 'pack', 'maxSharedStructures', 'shouldShareStructure', 'randomAccessStructure', 'freezeData'],
this.sharedStructuresKey ? this.setupSharedStructures() : {
this.sharedStructuresKey !== undefined ? this.setupSharedStructures() : {
copyBuffers: true, // need to copy any embedded buffers that are found since we use unsafe buffers
}, options, dbOptions), this.encoder));
}
Expand Down

0 comments on commit 7c8c903

Please sign in to comment.