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