react-native-blob-util
react-native-blob-util copied to clipboard
Ensuring ascii file reads do not fall through to else case for UTF-8 reading
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.