Skip to content

Commit

Permalink
fix: warning not clearing after keyword is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
James Duffy committed Feb 5, 2021
1 parent a42c104 commit f55290d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/JustNotSorry.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ class JustNotSorry extends Component {
WARNINGS.forEach((warning) => this.addWarning(node, warning));

checkForWarnings = (node) =>
Util.debounce(
() => this.addWarnings(node),
WAIT_TIME_BEFORE_RECALC_WARNINGS
);
Util.debounce(() => {
this.setState({ warnings: [] });
this.addWarnings(node);
}, WAIT_TIME_BEFORE_RECALC_WARNINGS);

addObserver = (event) => {
const node = event.currentTarget;
Expand Down

0 comments on commit f55290d

Please sign in to comment.