Skip to content

Commit

Permalink
Don't double remove things when leaving RRs
Browse files Browse the repository at this point in the history
  • Loading branch information
eritbh committed Jan 29, 2020
1 parent 36688ca commit ea35b4f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion extension/data/modules/removalreasons.js
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,11 @@ function removalreasons () {
logTitle = TBHelpers.replaceTokens(data, logTitle);

// At this point make extra sure the item actually does get removed
TBApi.removeThing(data.fullname, false);
TBCore.getApiThingInfo(data.fullname, data.subreddit, false, ({ham}) => {
if (!ham) {
TBApi.removeThing(data.fullname, false);
}
});

// // Clean up reason
reason = reason.trim();
Expand Down

0 comments on commit ea35b4f

Please sign in to comment.