Skip to content

Commit

Permalink
Check for a valid title to lower, before generation completes. If we …
Browse files Browse the repository at this point in the history
…do not do this, generation fails.
  • Loading branch information
Ben S. Stahlhood II committed May 16, 2013
1 parent e388aa4 commit 2433545
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.idea/
.settings/
.project
node_modules/
tmp/
doc/
doc/
7 changes: 5 additions & 2 deletions template/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ require([
// Titel der ersten Einträge von group[].name[] ermitteln (name hat Versionsliste)
var titles = {};
$.each(groupEntries, function(index, entries) {
var title = entries[0].title.toLowerCase().replace(/[äöüß]/g, function($0) { return umlauts[$0]; });
titles[title + " #~#" + index] = 1;
var title = entries[0].title;
if (title) {
title.toLowerCase().replace(/[äöüß]/g, function($0) { return umlauts[$0]; });
titles[title + " #~#" + index] = 1;
}
}); // each
// Sortieren
var values = Object.keys(titles);
Expand Down

0 comments on commit 2433545

Please sign in to comment.