Skip to content

Commit 9d8bc0e

Browse files
committed
Add alert if user tries to run unsaved mission
1 parent 8b3c5e6 commit 9d8bc0e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

experiments/WebUI/src/components/content/MapComponent.js

+4
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,10 @@ class MapComponent extends React.Component {
350350
}
351351

352352
runMission(num) {
353+
if (this.state.editedMissions[num] === 1) {
354+
alert("Error: Unsaved Changes. Save mission to vehicle before running.");
355+
return;
356+
}
353357
this.viewMission(num);
354358
//todo: should there be some response to check if mission has been run?
355359
this.management.runMission(parseInt(num) + 1);

0 commit comments

Comments
 (0)