Skip to content

A platform for community discussion. Free, open, simple.

FIX: with vanilla js .href and getAttribute("href") are not equal (#12609)

Joffrey JAFFEUX89f1bb7d2a09
diff --git a/app/assets/javascripts/discourse/app/lib/intercept-click.js b/app/assets/javascripts/discourse/app/lib/intercept-click.js
index 62563737603..7c807456b29 100644
--- a/app/assets/javascripts/discourse/app/lib/intercept-click.js
+++ b/app/assets/javascripts/discourse/app/lib/intercept-click.js
@@ -22,7 +22,7 @@ export default function interceptClick(e) {
}
const currentTarget = e.currentTarget;
- const href = currentTarget.href;
+ const href = currentTarget.getAttribute("href");
if (
!href ||