Skip to content

Commit 500d4ff

Browse files
authored
Return if not found
return if country flag not found
1 parent c9f0dca commit 500d4ff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

features/flag-on-profile/flag.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
if (locationElement) {
77
const locationText = locationElement.textContent.trim();
88
const countryFlag = getCountryFlag(locationText);
9+
if (!countryFlag) return;
910
const flagElement = document.createElement('span');
1011
flagElement.textContent = countryFlag;
1112
flagElement.style.marginRight = '4px';
@@ -228,4 +229,4 @@
228229

229230
return flags[locationText] || '';
230231
}
231-
})();
232+
})();

0 commit comments

Comments
 (0)