Skip to content

Commit

Permalink
Address code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-f committed Sep 12, 2017
1 parent 4194dcb commit aa61bfe
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/webid-oidc.js
Expand Up @@ -139,22 +139,18 @@ const sendAuthRequest = async (
return navigateTo(url)
}

async function saveAppHashFragment(store): Promise<void> {
await updateStorage(store, data => ({
const saveAppHashFragment = (store: AsyncStorage): Promise<any> =>
updateStorage(store, data => ({
...data,
appHashFragment: window.location.hash
}))
}

async function restoreAppHashFragment(store): Promise<void> {
let appHashFragment
await updateStorage(store, data => {
appHashFragment = data.appHashFragment
const restoreAppHashFragment = (store: AsyncStorage): Promise<any> =>
updateStorage(store, data => {
window.location.hash = data.appHashFragment
delete data.appHashFragment
return data
})
window.location.hash = appHashFragment
}

/**
* Answers whether a HTTP response requires WebID-OIDC authentication.
Expand Down

0 comments on commit aa61bfe

Please sign in to comment.