From dd291da265c0fcfc298e4d1a0ea7d2e132e91fb3 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Wed, 15 Sep 2021 16:13:43 +0200 Subject: [PATCH] Merge pull request #5113 from overleaf/em-compile-error-link Fix compile error link in TeX Live 2021 GitOrigin-RevId: d1193e638d6f41c2b8045350b16296c42944ff0c --- services/web/frontend/js/ide/pdf/controllers/PdfController.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/web/frontend/js/ide/pdf/controllers/PdfController.js b/services/web/frontend/js/ide/pdf/controllers/PdfController.js index 3874f4795f..44c16ced0e 100644 --- a/services/web/frontend/js/ide/pdf/controllers/PdfController.js +++ b/services/web/frontend/js/ide/pdf/controllers/PdfController.js @@ -762,8 +762,10 @@ App.controller( path = path.replace(/^\/compile\//, '') const rootDocDirname = ide.fileTreeManager.getRootDocDirname() - if (rootDocDirname != null) { + if (rootDocDirname) { path = path.replace(/^\.\//, rootDocDirname + '/') + } else { + path = path.replace(/^\.\//, '') } return path