Redirect to stored tab if the route is not found

This commit is contained in:
Ken-Håvard Lieng 2017-05-19 08:36:13 +02:00
parent 2afbf2359c
commit 5487ecdb57
5 changed files with 62 additions and 19 deletions

View file

@ -45,3 +45,12 @@ export function measureScrollBarWidth() {
return widthNoScroll - widthWithScroll;
}
export function find(arr, pred) {
for (let i = 0; i < arr.length; i++) {
if (pred(arr[i])) {
return arr[i];
}
}
return undefined;
}