seokju-na / react-thermal-printer

React for thermal printing
MIT License
288 stars 38 forks source link

Row throws an error when string from right side is too big #46

Open vitorsilvalima opened 1 year ago

vitorsilvalima commented 1 year ago

The row component throws an error if the string length from right side is too big

example:

<Row
        left={<Text>CEP:</Text>}
        right={
          <Text>Antiga 18 portão de garagem vermelho casa de esquina</Text>
        }
/>

Error thrown: Possible Unhandled Promise Rejection (id: 2):

RangeError: String.prototype.repeat count must be finite and non-negative RangeError: String.prototype.repeat count must be finite and non-negative

Hassan-jr commented 1 year ago

Share the whole code. I faced similar issues and solved it, but I can't see the mistakes I did in your code.