Skip to content

Commit d1c88cf

Browse files
author
eluxen
committed
optional listen to window resize event
1 parent b423b36 commit d1c88cf

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/Truncate.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ export default class Truncate extends Component {
5555
text.parentNode.removeChild(text);
5656
}
5757
});
58-
59-
window.addEventListener('resize', onResize);
6058
}
6159

6260
componentDidUpdate(prevProps) {
@@ -83,9 +81,6 @@ export default class Truncate extends Component {
8381
if (ellipsis) {
8482
ellipsis.parentNode.removeChild(ellipsis);
8583
}
86-
87-
window.removeEventListener('resize', onResize);
88-
8984
window.cancelAnimationFrame(timeout);
9085
}
9186

0 commit comments

Comments
 (0)