From 6c849b50f0121534ab1636e1346da524b72d8801 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Thu, 4 Jun 2020 12:23:33 -0500 Subject: [PATCH] show notification on compile error --- src/reducers/notification.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/reducers/notification.ts b/src/reducers/notification.ts index 5f91f712..aea5f36d 100644 --- a/src/reducers/notification.ts +++ b/src/reducers/notification.ts @@ -8,6 +8,7 @@ import { BootloaderConnectionActionType, BootloaderConnectionFailureReason, } from '../actions/lwp3-bootloader'; +import { MpyActionType } from '../actions/mpy'; import { NotificationActionType } from '../actions/notification'; import { ServiceWorkerActionType } from '../actions/service-worker'; import { createCountFunc } from '../utils/iter'; @@ -87,6 +88,11 @@ const list: Reducer = (state = [], action) => { return append(state, Level.Error, MessageId.BleConnectFailed); } return state; + case MpyActionType.DidFailToCompile: + return [ + ...state, + { id: nextId(), level: Level.Error, message: action.err }, + ]; case NotificationActionType.Add: return [ ...state,