From 907c2c8034c1dafde2e71c167c79288c953cd4cf Mon Sep 17 00:00:00 2001 From: Ignacio Durand Date: Fri, 5 Mar 2021 17:03:42 -0300 Subject: [PATCH] Adds 'binding' to the unbind hook Linter was giving me an error because the `binding` variable doesn't exists on that context. --- src/vue-input-autowidth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vue-input-autowidth.js b/src/vue-input-autowidth.js index e1b762a..bce82c7 100644 --- a/src/vue-input-autowidth.js +++ b/src/vue-input-autowidth.js @@ -48,7 +48,7 @@ export default { componentUpdated: function(el, binding) { checkWidth(el, binding); }, - unbind: function(el) { + unbind: function(el, binding) { document.body.removeChild(el.mirror); el.removeEventListener("input", checkWidth.bind(null, el, binding)); }