Fix Error count in solidity compiler badge

pull/1582/head
yann300 3 years ago
parent 93bddf612b
commit d133d75379
  1. 2
      apps/solidity-compiler/src/app/compiler-api.ts

@ -264,7 +264,7 @@ export const CompilerApiMixin = (Base) => class extends Base {
) )
}) })
} else { } else {
const count = (data.errors ? data.errors.filter(error => error.severity === 'error').length : 0) + data.error ? 1 : 0 const count = (data.errors ? data.errors.filter(error => error.severity === 'error').length : 0 + (data.error ? 1 : 0))
this.emit('statusChanged', { key: count, title: `compilation failed with ${count} error${count > 1 ? 's' : ''}`, type: 'error' }) this.emit('statusChanged', { key: count, title: `compilation failed with ${count} error${count > 1 ? 's' : ''}`, type: 'error' })
} }
// Update contract Selection // Update contract Selection

Loading…
Cancel
Save