From 84d9720d102ae316109b546541afee8f3aec5ba1 Mon Sep 17 00:00:00 2001 From: CollinBeczak Date: Wed, 13 Sep 2023 12:04:51 -0500 Subject: [PATCH] Add error handling for the taskMap widget and fix pauseKeywords issue --- src/components/Widgets/TaskMapWidget/Messages.js | 5 +++++ .../Widgets/TaskMapWidget/TaskMapWidget.js | 15 +++++++++++++++ .../KeyboardShortcuts/KeyboardShortcuts.js | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/components/Widgets/TaskMapWidget/Messages.js b/src/components/Widgets/TaskMapWidget/Messages.js index f35660431..0d184d8f3 100644 --- a/src/components/Widgets/TaskMapWidget/Messages.js +++ b/src/components/Widgets/TaskMapWidget/Messages.js @@ -18,4 +18,9 @@ export default defineMessages({ id: "Widgets.TaskMapWidget.editMode", defaultMessage: "Current Mode:", }, + + rapidFailed: { + id: "Widgets.TaskMapWidget.rapidFailed", + defaultMessage: "Widget Failed! Geometries Null!", + }, }) diff --git a/src/components/Widgets/TaskMapWidget/TaskMapWidget.js b/src/components/Widgets/TaskMapWidget/TaskMapWidget.js index c97b14276..5e2d6df03 100644 --- a/src/components/Widgets/TaskMapWidget/TaskMapWidget.js +++ b/src/components/Widgets/TaskMapWidget/TaskMapWidget.js @@ -73,6 +73,21 @@ export default class TaskMapWidget extends Component { render() { const editMode = this.props.getUserAppSetting ? this.props.getUserAppSetting(this.props.user, 'isEditMode') : false; + if(!this.props.task.geometries.features){ + return ( + +
+ +
+
+ ) + } + return (