JS bug (Guess I should have used Haskell here)
authorJoachim Breitner <mail@joachim-breitner.de>
Sat, 30 May 2015 12:19:21 +0000 (14:19 +0200)
committerJoachim Breitner <mail@joachim-breitner.de>
Sat, 30 May 2015 12:19:21 +0000 (14:19 +0200)
site/js/gipeda.js

index 8a9362b..20c66d3 100644 (file)
@@ -200,8 +200,10 @@ function shortRev(rev) {
 }
 Handlebars.registerHelper('shortRev', shortRev);
 Handlebars.registerHelper('id', function (text) {
-    lines = text.split(/\r?\n/);
-    return new Handlebars.SafeString(lines.map(Handlebars.escapeExpression).join('&#10;'))
+    if (text) {
+       lines = text.split(/\r?\n/);
+       return new Handlebars.SafeString(lines.map(Handlebars.escapeExpression).join('&#10;'))
+    }
 });
 Handlebars.registerHelper('iso8601', function(timestamp) {
   if (!timestamp) { return '' };