Skip to content

Commit

Permalink
optional listen to window resize event
Browse files Browse the repository at this point in the history
  • Loading branch information
eluxen committed Nov 26, 2019
1 parent b423b36 commit d1c88cf
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/Truncate.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ export default class Truncate extends Component {
text.parentNode.removeChild(text);
}
});

window.addEventListener('resize', onResize);
}

componentDidUpdate(prevProps) {
Expand All @@ -83,9 +81,6 @@ export default class Truncate extends Component {
if (ellipsis) {
ellipsis.parentNode.removeChild(ellipsis);
}

window.removeEventListener('resize', onResize);

window.cancelAnimationFrame(timeout);
}

Expand Down

0 comments on commit d1c88cf

Please sign in to comment.