Skip to content

Commit

Permalink
Fixed memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
Vezul committed Nov 7, 2015
1 parent 9ed036f commit 5e5207f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/autosize.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function assign(ta, {setOverflowX = true, setOverflowY = true} = {}) {
if (isNaN(heightOffset)) {
heightOffset = 0;
}

update();
}

Expand Down Expand Up @@ -128,6 +128,7 @@ function assign(ta, {setOverflowX = true, setOverflowY = true} = {}) {
ta.removeEventListener('input', update);
ta.removeEventListener('keyup', update);
ta.removeEventListener('autosize:destroy', destroy);
ta.removeEventListener('autosize:update', update);
set.delete(ta);

Object.keys(style).forEach(key => {
Expand Down

0 comments on commit 5e5207f

Please sign in to comment.