From 4769818713ee50c90f5b70e245b2cdf2e7165028 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Wed, 28 Aug 2019 14:19:43 +0200 Subject: [PATCH 1/2] check for key is defined --- src/app/components/vertical-icons.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/vertical-icons.js b/src/app/components/vertical-icons.js index 5012e68006..072d1d9cd7 100644 --- a/src/app/components/vertical-icons.js +++ b/src/app/components/vertical-icons.js @@ -48,7 +48,7 @@ export class VerticalIcons extends Plugin { const types = ['error', 'warning', 'success', 'info', ''] const fn = (status) => { if (!types.includes(status.type) && status.type) throw new Error(`type should be ${keys.join()}`) - if (!status.key) throw new Error(`status key should be defined`) + if (status.key === undefined) throw new Error(`status key should be defined`) if (typeof status.key === 'string' && (!keys.includes(status.key))) { throw new Error('key should contain either number or ' + keys.join()) From 0ea3ba6192449988696226dc2b33957c8c2d657a Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Thu, 29 Aug 2019 10:07:11 +0200 Subject: [PATCH 2/2] check for error list length and not existence --- src/app/tabs/compile-tab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index 0108cf42f0..9a12a28ac2 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -114,7 +114,7 @@ class CompileTab extends ViewPlugin { if (success) { // forwarding the event to the appManager infra this.emit('compilationFinished', source.target, source, 'soljson', data) - if (data.errors) { + if (data.errors && data.errors.length > 0) { this.emit('statusChanged', { key: data.errors.length, title: `compilation finished successful with warning${data.errors.length > 1 ? 's' : ''}`,