mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Use error type instead of error message to check v1 connection error
This commit is contained in:
parent
82a8e37071
commit
8de9e9fae4
1 changed files with 1 additions and 1 deletions
|
@ -180,7 +180,7 @@ module.exports = ProjectController =
|
|||
ProjectGetter.findAllUsersProjects user_id, 'name lastUpdated publicAccesLevel archived owner_ref tokens', cb
|
||||
v1Projects: (cb) ->
|
||||
Modules.hooks.fire "findAllV1Projects", user_id, (error, projects = []) ->
|
||||
if error? and error.message == 'No V1 connection'
|
||||
if error? and error instanceof V1ConnectionError
|
||||
return cb(null, projects: [], tags: [], noConnection: true)
|
||||
return cb(error, projects[0]) # hooks.fire returns an array of results, only need first
|
||||
hasSubscription: (cb)->
|
||||
|
|
Loading…
Reference in a new issue