From 9b1c906032b2cec8506ceddd417c93dcb35adf27 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Tue, 8 Jan 2013 18:53:45 +0100 Subject: [PATCH] Always select last month after loading them. --- src/html/js/entries.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/html/js/entries.js b/src/html/js/entries.js index 0bc0157..a7038f6 100644 --- a/src/html/js/entries.js +++ b/src/html/js/entries.js @@ -180,10 +180,8 @@ var ListViewModel = function() { self.loadMonths = function(account){ $.post("api/entry.php", {action: "get_months", account: account.id}).success(function (result) { self.months(result); - - if(! self.month()) { - self.month(result[result.length - 1]); - } + + self.month(result[result.length - 1]); }); };