Skip to content

Commit 477f69f

Browse files
agau-odoobso-odoo
authored andcommitted
s_donation: fix duplicate currency before modifying list
1 parent e543bec commit 477f69f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

addons/website_payment/static/src/snippets/s_donation/donation_snippet.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ export class DonationSnippet extends Interaction {
4444
start() {
4545
const prefilledButtonEls = this.el.querySelectorAll(".s_donation_btn, .s_range_bubble");
4646
for (const prefilledButtonEl of prefilledButtonEls) {
47+
// Remove existing currency
48+
prefilledButtonEl.querySelector(".s_donation_currency")?.remove();
4749
const insertBefore = this.currency.position === "before";
4850
const currencyEl = document.createElement("span");
4951
currencyEl.innerText = this.currency.symbol;

0 commit comments

Comments
 (0)