avil13 / vue-sweetalert2

A convenient wrapper for sweetalert2.
https://avil13.github.io/vue-sweetalert2/
656 stars 75 forks source link

TypeError: this.constructor.argsToParams is not a function when calling "this.$swal.fire()" #84

Closed rhnchn9 closed 5 years ago

rhnchn9 commented 5 years ago

version: 2.1.4 platform: Mac

I am getting following error message in the console when I am using "this.$swal.fire()":

TypeError: this.constructor.argsToParams is not a function

In earlier version(1.6.4), this used to be working fine before but not now anymore once I updated to the latest version (which is 2.1.4 now).So, I reverted back to the older version.

You can check this in CodeSandbox below: https://codesandbox.io/s/vue-template-hqsly?fontsize=14

Just click the button "show alert".

Side note: I tried replacing "this.$swal.fire()" to "this.$swal()" and it worked as before but then I have to make changes everywhere in my code.

Please let me know if this can be fixed or I have to assume it's a breaking change.

Sephster commented 5 years ago

Seconded. I am getting this as well (on the same version). Platform is Ubuntu

avil13 commented 5 years ago

fixed in version 2.1.5.

Tnx for issue.

ghost commented 4 years ago

Upgrading the version to 2.1.5 and changing from using this.$swal() to this.$swal.fire() worked for me