Skip to content

Commit

Permalink
Don't store empty strings as translations
Browse files Browse the repository at this point in the history
  • Loading branch information
flommy committed Jun 15, 2021
1 parent 297d7b2 commit 6580350
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions views/project.php
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,12 @@
langs.forEach(function(lang) {
if (project.values[lang] && project.values[lang][key] && project.values[lang][key].trim()) {
project.done[lang]++
if (project.values[lang] && typeof project.values[lang][key] === "string") {
if (project.values[lang][key].trim() === "") {
delete project.values[lang][key];
} else {
project.done[lang]++
}
}
})
Expand Down

0 comments on commit 6580350

Please sign in to comment.