Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Commit

Permalink
fix(stripe elements): destroy element instance and reset stripe objec…
Browse files Browse the repository at this point in the history
…t - big thanks to @jasonlfunk
  • Loading branch information
softbeehive committed Oct 13, 2017
1 parent 7ecd940 commit 2bbb2f9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-stripe-elements",
"version": "0.2.3",
"version": "0.2.4",
"description": "Stripe Elements components for Vue",
"main": "./dist/index.js",
"scripts": {
Expand All @@ -17,8 +17,11 @@
"elements",
"payment"
],
"author": "Norman Köhring <norman.koehring@fromatob.com>",
"license": "ISC",
"author": {
"name": "fromAtoB GmbH",
"url": "https://fromatob.com"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/fromatob/vue-stripe-elements/issues"
},
Expand Down
2 changes: 1 addition & 1 deletion src/StripeElement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default {
beforeDestroy () {
this._element.unmount()
this._element.destroy()
destroy();
destroy()
},
methods: {
Expand Down
7 changes: 4 additions & 3 deletions src/stripeElements.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ export function create(elementType, key_or_stripe, options = {}) {
}

export function destroy() {
Stripe.instance = null;
Stripe.elements = null;
Stripe.createToken = null;
Stripe.instance = null
Stripe.elements = null
Stripe.createToken = null
Stripe.createSource = null
}

0 comments on commit 2bbb2f9

Please sign in to comment.