Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
create then add if valid
Browse files Browse the repository at this point in the history
  • Loading branch information
jjeffryes committed Jan 10, 2020
1 parent deebd4d commit 1f9cd7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/views/components/moderators/Moderators.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ export default class extends baseVw {
const validCur = anySupportedByWallet(modCurs);

if ((!!validMod && validCur || this.options.showInvalid)) {
this.moderatorsCol.add(new Moderator(data, { parse: true, validate: true }));
const newMod = new Moderator(data, { parse: true });
if (newMod.isValid()) this.moderatorsCol.add(newMod);
this.removeNotFetched(data.peerID);
} else {
// remove the invalid moderator from the notFetched list
Expand Down

0 comments on commit 1f9cd7a

Please sign in to comment.