react-native-blob-util icon indicating copy to clipboard operation
react-native-blob-util copied to clipboard

Ensuring ascii file reads do not fall through to else case for UTF-8 reading

Open Daniel528 opened this issue 1 year ago • 0 comments

In my use of react-native-blob-util I was reading files with the ascii encoding. When reading I would receive a unrecognized selector sent to instance RCTFatal error. The file read was still successful as the ascii encoding resolve function was still run correctly. The issue was the error was thrown when the UTF8 else case was also run.

I figure each file read only one encoding resolve function should be run dependant on the encoding passed in by the user. The change to an if/else if/else should ensure only one encoder function runs compared to the previous if/if/else.

Daniel528 avatar Apr 24 '24 16:04 Daniel528