Add defensive check for req.query, fixing tests

This commit is contained in:
Alasdair Smith 2018-04-10 10:38:40 +01:00
parent f0bcb332bb
commit 35cc5bf19c

View file

@ -301,7 +301,7 @@ module.exports = ProjectController =
themes: THEME_LIST
maxDocLength: Settings.max_doc_length
useV2History: !!project.overleaf?.history?.display
showRichText: req.query.rt == 'true'
showRichText: req.query?.rt == 'true'
timer.done()
_buildProjectList: (allProjects, v1Projects = [])->