Only redirect to a stored tab if it still exists

This commit is contained in:
Ken-Håvard Lieng 2017-06-29 07:36:58 +02:00
parent 962f7d1eb0
commit 3af6ad9cd9
3 changed files with 26 additions and 20 deletions

View file

@ -52,6 +52,10 @@ export function measureScrollBarWidth() {
}
export function find(arr, pred) {
if (!arr) {
return null;
}
for (let i = 0; i < arr.length; i++) {
if (pred(arr[i])) {
return arr[i];