Fix Error count in solidity compiler badge

pull/5370/head
yann300 3 years ago
parent 8ea98186d0
commit cc912bbdfe
  1. 2
      apps/solidity-compiler/src/app/compiler-api.ts

@ -264,7 +264,7 @@ export const CompilerApiMixin = (Base) => class extends Base {
)
})
} 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' })
}
// Update contract Selection

Loading…
Cancel
Save