Skip to content

Commit

Permalink
Merge pull request #65 from xiaohutai/master
Browse files Browse the repository at this point in the history
Fix removal of all translations in case of an empty translation
  • Loading branch information
bobdenotter authored Apr 17, 2020
2 parents 9c09955 + ce2241d commit b76ca7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LabelsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function twigL($label, $lang = false)
}

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

Expand Down

0 comments on commit b76ca7f

Please sign in to comment.