Skip to content

Commit b76ca7f

Browse files
authored
Merge pull request #65 from xiaohutai/master
Fix removal of all translations in case of an empty translation
2 parents 9c09955 + ce2241d commit b76ca7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LabelsExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public function twigL($label, $lang = false)
184184
}
185185

186186
// If we're automatically saving new/missing labels, add it to the JSON file
187-
if ($config->isAddMissing() && $this->isValidLanguage($lang) && !$savedLabels->hasItem($label)) {
187+
if ($config->isAddMissing() && $this->isValidLanguage($lang) && !$savedLabels->has($label)) {
188188
$labels->addLabel($label);
189189
}
190190

0 commit comments

Comments
 (0)