Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Prevent error when decode: false option is set in createReadStream. #403

Merged
merged 8 commits into from
Jan 30, 2019
3 changes: 2 additions & 1 deletion src/chunktransformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,12 @@ class ChunkTransformer extends Transform {
const newRowKey = Mutation.convertFromBytes(chunk.rowKey, {
userOptions: this.options,
});
const oldRowKey = row.key || '';
if (
newRowKey &&
chunk.rowKey &&
newRowKey.length !== 0 &&
newRowKey !== row.key
newRowKey.toString() !== oldRowKey.toString()
) {
this.destroy(
new TransformError({
Expand Down