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

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

GitOrigin-RevId: 481f33782e4b473e535fbeaee786f04f897f1697
Paulo Reis 6 лет назад
Родитель
Сommit
a75c191d5b

+ 6 - 2
services/web/frontend/js/features/preview/components/preview-pane.js

@@ -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} />