Skip to content

Commit

Permalink
Fix more issues found by LGTM
Browse files Browse the repository at this point in the history
These were overlooked in the last sweep.
  • Loading branch information
Zarel committed Oct 28, 2018
1 parent bd71410 commit 0553f42
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion chat-plugins/thehappyplace.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ exports.commands = {
Rooms.global.writeChatRoomData();
return;
}
const quote = target.split('|')[0].replace('"', '');
const quote = target.split('|')[0].replace(/"/g, '');
const author = target.split('|')[1];
if (!quote) return;
if (!author) {
Expand Down
2 changes: 0 additions & 2 deletions mods/gen3/random-teams.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class RandomGen3Teams extends RandomGen4Teams {
* @return {RandomTeamsTypes["RandomSet"]}
*/
randomSet(template, slot, teamDetails = {}) {
if (slot === undefined) slot = 1;
let baseTemplate = (template = this.getTemplate(template));
let species = template.species;

Expand Down Expand Up @@ -500,7 +499,6 @@ class RandomGen3Teams extends RandomGen4Teams {
}
}

item = 'Leftovers';
if (template.requiredItems) {
item = this.sample(template.requiredItems);

Expand Down
2 changes: 1 addition & 1 deletion tournaments/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ const commands = {
if (result.charAt(0) === '1') {
connection.popup("Your team is valid for this tournament.");
} else {
const format = Dex.getFormat(tournament.originalFormat).name.replace(/\[/, '\\[').replace(/\]/, '\\]');
const format = Dex.getFormat(tournament.originalFormat).name.replace(/\[/g, '\\[').replace(/\]/g, '\\]');
connection.popup(`Your team was rejected for the following reasons:\n\n- ${result.slice(1).replace(/\n/g, '\n- ').replace(new RegExp(format, 'g'), 'this tournament')}`);
}
});
Expand Down

0 comments on commit 0553f42

Please sign in to comment.