added check of compilation result status before setting pdfUrl/pdfDownloadUrl (#5697)

GitOrigin-RevId: ebf78bc2f98a952411875740fe912e275f83b224
This commit is contained in:
Miguel Serrano 2021-11-08 12:15:24 +01:00 committed by Copybot
parent 07caf75004
commit 8b85ef36eb

View file

@ -229,10 +229,12 @@ export function CompileProvider({ children }) {
setLogEntryAnnotations(
buildLogEntryAnnotations(result.logEntries.all, ide.fileTreeManager)
)
setLogEntries(result.logEntries)
setFileList(result.fileList)
if (data.status === 'success') {
setPdfDownloadUrl(result.pdfDownloadUrl)
setPdfUrl(result.pdfUrl)
}
setLogEntries(result.logEntries)
setFileList(result.fileList)
setRawLog(result.log)
// sample compile stats for real users