mirror of
https://github.com/maxboeck/webring
synced 2024-11-22 03:13:04 +00:00
fix bug in index lookup
This commit is contained in:
parent
6af306809c
commit
e48dccb1f0
1 changed files with 3 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
import members from '../../src/data/members'
|
||||
|
||||
export const redirect = site => {
|
||||
const statusMessage = `redirecting to: ${site.title}`
|
||||
const statusMessage = `redirecting to: ${site.url}`
|
||||
console.log(statusMessage)
|
||||
|
||||
return {
|
||||
|
@ -11,7 +11,8 @@ export const redirect = site => {
|
|||
}
|
||||
}
|
||||
|
||||
export const getIndex = url => members.findIndex(site => url.includes(site.url))
|
||||
export const getIndex = url =>
|
||||
url ? members.findIndex(site => url.includes(site.url)) : -1
|
||||
|
||||
export const getNext = url => {
|
||||
const index = getIndex(url)
|
||||
|
|
Loading…
Reference in a new issue