Make sure the errors and warnings count is re-read after a compile, even if it does not change.

GitOrigin-RevId: 481f33782e4b473e535fbeaee786f04f897f1697
This commit is contained in:
Paulo Reis 2020-10-07 11:43:54 +01:00 committed by Copybot
parent 6e99c7b722
commit a75c191d5b

View file

@ -43,10 +43,14 @@ function PreviewPane({
onToggleLogs={onToggleLogs}
/>
<span aria-live="polite" className="sr-only">
{nErrors ? t('n_errors', { count: nErrors }) : ''}
{nErrors && !compilerState.isCompiling
? t('n_errors', { count: nErrors })
: ''}
</span>
<span aria-live="polite" className="sr-only">
{nWarnings ? t('n_warnings', { count: nWarnings }) : ''}
{nWarnings && !compilerState.isCompiling
? t('n_warnings', { count: nWarnings })
: ''}
</span>
{showLogs ? (
<PreviewLogsPane logEntries={compilerState.logEntries.all} />