зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1572401 - Don't display "{$name}" for waiting cache ID. r=perry
There was a falsey check that was treating an empty string to interpolate as equivalent to undefined having been passed, erroneously displaying the templating string instead of replacing it with an empty string. Depends on D66150 Differential Revision: https://phabricator.services.mozilla.com/D66151 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
7fc5e62a41
Коммит
03c4e8912a
|
@ -81,7 +81,9 @@ async function display(info, pushService) {
|
|||
let bold = document.createElement("strong");
|
||||
bold.setAttribute("data-l10n-name", "item-label");
|
||||
item.appendChild(bold);
|
||||
if (!value) {
|
||||
// Falsey values like "" are still valid values, so check exactly against
|
||||
// undefined for the cases where the caller did not provide any value.
|
||||
if (value === undefined) {
|
||||
document.l10n.setAttributes(item, l10nId);
|
||||
} else if (makeLink) {
|
||||
let link = document.createElement("a");
|
||||
|
|
Загрузка…
Ссылка в новой задаче