From aceee9b115b43c712ceb4e912971db6d258beb12 Mon Sep 17 00:00:00 2001 From: Nikolai Kristiansen Date: Wed, 7 May 2014 19:58:21 +0200 Subject: [PATCH] Adds default for no posts --- wp-content/themes/tn-2014/js/app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-content/themes/tn-2014/js/app.js b/wp-content/themes/tn-2014/js/app.js index 047e84a..9bc4ec4 100644 --- a/wp-content/themes/tn-2014/js/app.js +++ b/wp-content/themes/tn-2014/js/app.js @@ -5,6 +5,9 @@ var query_params = { function format_posts(posts) { var html = ''; + if(posts.length === 0) { + html = '

Ingen planlagte arrangementer :\'(

'; + } for(var i=0; i< posts.length; i++) { var post = posts[i]; html += '

  • ';