FIX: Links are not displayed if the setting doesn't associate a locale (#31)
Related #30. Reported here: https://meta.discourse.org/t/missing-custom-header-links-after-update/262594 #### Current behavior The links are not displayed if a locale is not provided in the setting. #### Expected behavior By not associating a locale with a link, the link should be displayed by default regardless of the user's language.
This commit is contained in:
parent
0661c627cb
commit
6bc3216b80
|
@ -44,7 +44,7 @@ export default {
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.replace(/\s/gi, "-")}-custom-header-links`;
|
.replace(/\s/gi, "-")}-custom-header-links`;
|
||||||
|
|
||||||
const localeClass = locale === "" ? "" : `.${locale}`;
|
const localeClass = locale === undefined ? "" : `.${locale}`;
|
||||||
|
|
||||||
const anchorAttributes = {
|
const anchorAttributes = {
|
||||||
title: linkTitle,
|
title: linkTitle,
|
||||||
|
@ -55,7 +55,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
locale !== "" &&
|
locale !== undefined &&
|
||||||
document.documentElement.lang &&
|
document.documentElement.lang &&
|
||||||
document.documentElement.lang !== locale
|
document.documentElement.lang !== locale
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Reference in New Issue