Skip to content

Commit

Permalink
Fix issue with saving IV list format
Browse files Browse the repository at this point in the history
  • Loading branch information
versx committed May 8, 2021
1 parent b9b5c6e commit 4dc89ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ router.post('/pokemon/new', async (req, res) => {
}
const sql = [];
const split = pokemon.split(',');
const ivList = iv_list ? iv_list.replace('\r', '').split('\n') : [];
const ivList = iv_list ? iv_list.replace(/\r\n/g, ',').replace(/\n/g, ',').split(',') : [];
for (const pokemonId of split) {
let exists = await Pokemon.getByPokemon(guild_id, user_id, pokemonId, form);
if (exists) {
Expand Down

0 comments on commit 4dc89ad

Please sign in to comment.