Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

TypeError: "this.el.form is null" #116

Open
trenyture opened this issue May 14, 2019 · 0 comments
Open

TypeError: "this.el.form is null" #116

trenyture opened this issue May 14, 2019 · 0 comments

Comments

@trenyture
Copy link

I am using your great component for months and I thought this error was from my code (VueJS application), but in fact I just discovered that there is an error in the minification of your code...

When I am in the source file, I can see that the this.el.form.removeEventListener("reset",this.events.reset) is into an if statement that check if this.el.form is not null ... BUT in the minified file, there is no such if statement, so i add it myself and the error disappeared... I don't know what is it going between the source file and the minified file but that was turning me crazy. :)

So I replaced
this.on("selectr.destroy",function(){this.el.form.removeEventListener("reset",this.events.reset)}))};
by
this.on("selectr.destroy",function(){if(this.el.form!=null){this.el.form.removeEventListener("reset",this.events.reset)}}))};

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant