diff --git a/src/index.js b/src/index.js index 5f795a7..25765f6 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,7 @@ function Autosize(Alpine) { - Alpine.directive('autosize', () => { - $el.style.height = '4px'; - $el.style.height = `${$el.scrollHeight}px`; + Alpine.directive('autosize', (el) => { + el.style.height = '4px'; + el.style.height = `${el.scrollHeight}px`; }); }