thiendangit / react-native-thermal-receipt-printer-image-qr

React native thermal receipt printer
https://www.npmjs.com/package/react-native-thermal-receipt-printer-image-qr
119 stars 80 forks source link

Refactor closeConn method in printer modules to handle null adapter #119

Closed matheus-caldeira closed 1 month ago

matheus-caldeira commented 5 months ago

The closeConn method in the RNBLEPrinterModule, RNNetPrinterModule, and RNUSBPrinterModule has been refactored to handle the case where the adapter is null. If the adapter is null, it is initialized before closing the connection. This change ensures that the closeConn method works correctly even when the adapter is not yet instantiated.