Skip to content

Commit

Permalink
companion: check that provideTokens were loaded before logging out
Browse files Browse the repository at this point in the history
  • Loading branch information
ifedapoolarewaju committed Mar 25, 2019
1 parent 671fc21 commit 239f08c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@uppy/companion/src/server/controllers/logout.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function logout (req, res) {
const session = req.session
const providerName = req.params.providerName

if (req.uppy.providerTokens[providerName]) {
if (req.uppy.providerTokens && req.uppy.providerTokens[providerName]) {
delete req.uppy.providerTokens[providerName]
tokenService.removeFromCookies(res, req.uppy.options, req.uppy.provider.authProviderName)
}
Expand Down

0 comments on commit 239f08c

Please sign in to comment.