Skip to content

Commit

Permalink
fix boolean (#56)
Browse files Browse the repository at this point in the history
* fix

* bump patch version
  • Loading branch information
seokju-na authored Sep 8, 2023
1 parent e4c3375 commit f21560e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .yarn/versions/a039253e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
releases:
"@react-thermal-printer/image": patch
"@react-thermal-printer/printer": patch
react-thermal-printer: patch
3 changes: 2 additions & 1 deletion packages/image/src/imageToRaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export function imageToRaster(
}

const color = rgbToBlack(pixel);
if (color === 1) {
// eslint-disable-next-line no-extra-boolean-cast
if (Boolean(color)) {
const mask = 1 << (7 - k);
byte |= mask;
}
Expand Down

0 comments on commit f21560e

Please sign in to comment.