Просмотр исходного кода

Merge pull request #481 from sharelatex/as-fix-tests

Add defensive check for req.query, fixing tests
Alasdair Smith 8 лет назад
Родитель
Сommit
bcb025e706
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      services/web/app/coffee/Features/Project/ProjectController.coffee

+ 1 - 1
services/web/app/coffee/Features/Project/ProjectController.coffee

@@ -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 = [])->