Skip to content
Snippets Groups Projects
Commit c50d16c0 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fixed an issue with history truncation

parent 2cdccc00
No related branches found
No related tags found
No related merge requests found
...@@ -21,8 +21,7 @@ var search_history = { ...@@ -21,8 +21,7 @@ var search_history = {
return x != query; return x != query;
}); });
tmp.push(query); tmp.push(query);
tmp = tmp.slice(Math.max(0, tmp.length - tmp.max_size)); localStorage.setItem('history', JSON.stringify(tmp.slice(0, tmp.max_size)));
localStorage.setItem('history', JSON.stringify(tmp));
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment