Fix Error count in solidity compiler badge

pull/1342/head
yann300 3 years ago committed by davidzagi93@gmail.com
parent 0072f2e93c
commit a4e8e953e8
  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