aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Baumstark2012-01-25 21:52:15 +0100
committerNiklas Baumstark2012-04-10 23:58:08 +0200
commite8b402595e5e7ebeb5abc6e1d058692370369cad (patch)
tree7de9ff2235517bde9d1223545d6ea0a98e156e06
parent7c2755bcd67968f9646ac3b79432bf45da349246 (diff)
downloadvimium-e8b402595e5e7ebeb5abc6e1d058692370369cad.tar.bz2
fix bug when history maxResults is too high
-rw-r--r--background_page.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/background_page.html b/background_page.html
index b6b72406..a56028bc 100644
--- a/background_page.html
+++ b/background_page.html
@@ -339,7 +339,7 @@
function getHistory(args, port) {
useHistory(function(history) {
port.postMessage({
- history: history.slice(history.length - args.maxResults)
+ history: history.slice(Math.max(history.length - args.maxResults, 0))
});
});
};