AndInTheClouds / chordreader2

Search for, display, transpose and save chords on your phone, that you get from the interwebs. :notes:
GNU General Public License v3.0
33 stars 8 forks source link

Prevent a crash when the save file is empty (#16) #17

Closed wtimme closed 1 year ago

wtimme commented 1 year ago

This fixes #16 by returning early in case the save file is empty. Running .split("\n") produces an array with one element, which is null. As a consequence, executing .replace() on null causes a crash.