Skip to content

Commit

Permalink
fix: unique metadata is not properly typed as a Uint8Array (#3166)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbcfd authored Feb 16, 2024
1 parent 0a9403f commit 63c7afc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/common/src/utils/stream-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ export class StreamUtils {
cloned.metadata.context = state.metadata.context.toString()
}
if (state.metadata?.unique && state.type != TILE_TYPE_ID) {
cloned.metadata.unique = uint8arrays.toString(cloned.metadata.unique, 'base64')
cloned.metadata.unique = uint8arrays.toString(
Uint8Array.from(state.metadata.unique),
'base64'
)
}

cloned.doctype = StreamType.nameByCode(cloned.type)
Expand Down

0 comments on commit 63c7afc

Please sign in to comment.