From 70abd666b4b829d91923b3d40d9049cfb5234272 Mon Sep 17 00:00:00 2001 From: Christopher Rogers Date: Mon, 29 Jan 2024 12:49:01 -0800 Subject: [PATCH] Ensures singular attachment for 3DS container --- lib/three-d-secure-action.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/three-d-secure-action.jsx b/lib/three-d-secure-action.jsx index f9a8d06..37bfc40 100644 --- a/lib/three-d-secure-action.jsx +++ b/lib/three-d-secure-action.jsx @@ -73,6 +73,7 @@ export default class ThreeDSecureAction extends React.PureComponent { const { actionTokenId } = props; + this._attached = false; this._container = React.createRef(); this._risk = this.context.recurly.Risk(); this._threeDSecure = this._risk.ThreeDSecure({ actionTokenId }); @@ -82,7 +83,9 @@ export default class ThreeDSecureAction extends React.PureComponent { } componentDidMount () { + if (this._attached) return; this._threeDSecure.attach(this._container.current); + this._attached = true; } render () {