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

Commit

Permalink
fix application order of logic
Browse files Browse the repository at this point in the history
  • Loading branch information
bdistin committed May 29, 2020
1 parent 4ddc9d6 commit 8076406
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/lib/util/RichDisplay.ts
Expand Up @@ -91,13 +91,15 @@ export class RichDisplay {

// To maintain emoji order, we will delete from rather than insert according to options

if (!options.firstLast ?? true) {
// eslint-disable-next-line @typescript-eslint/no-extra-parens
if (!(options.firstLast ?? true)) {
this._emojis.delete(ReactionMethods.First);
this._emojis.delete(ReactionMethods.Last);
}

if (!options.jump ?? true) this._emojis.delete(ReactionMethods.Jump);
if (!options.stop ?? true) this._emojis.delete(ReactionMethods.Stop);
// eslint-disable-next-line @typescript-eslint/no-extra-parens
if (!(options.jump ?? true)) this._emojis.delete(ReactionMethods.Jump);
// eslint-disable-next-line @typescript-eslint/no-extra-parens
if (!(options.stop ?? true)) this._emojis.delete(ReactionMethods.Stop);
}

/**
Expand Down

0 comments on commit 8076406

Please sign in to comment.