diff --git a/kumascript/macros/APIRef.ejs b/kumascript/macros/APIRef.ejs
index 7c568af65348..a00bfa2c5378 100644
--- a/kumascript/macros/APIRef.ejs
+++ b/kumascript/macros/APIRef.ejs
@@ -175,7 +175,7 @@ async function buildSublist(pages, title) {
const title = getPageTitle(aPage);
result += '
';
-
+
const pageBadges = (await page.badges(aPage)).join("");
if (rtlLocales.indexOf(locale) != -1) {
@@ -205,8 +205,10 @@ function buildIFList(interfaces, title) {
var result = '' + title + '
';
for (var i = 0; i < interfaces.length; i++) {
- var url = interfaces[i].replace('()', '').replace('.', '/');
- result += `- ${web.smartLink(APIHref + '/' + url, null, `
${interfaces[i]}
`, APIHref, null, "APIRef")} `;
+ var url = APIHref + '/' + interfaces[i].replace('()', '').replace('.', '/');
+ if (!url.endsWith(slug)) {
+ result += `- ${web.smartLink(url, null, `
${interfaces[i]}
`, APIHref, null, "APIRef")} `;
+ }
}
result += '
';