Skip to content

Commit ce135ba

Browse files
committed
Block default universe selector
1 parent 23bb7ef commit ce135ba

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jderobot-ide-interface",
3-
"version": "0.2.11",
3+
"version": "0.2.12",
44
"main": "dist/main.js",
55
"typings": "dist/index.d.ts",
66
"files": [

src/components/Dropdown/Dropdown.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const DropdownStatusBar = ({
1212
down,
1313
setter,
1414
possibleValues,
15+
onOpen,
1516
children,
1617
}: {
1718
id: string;
@@ -21,6 +22,7 @@ export const DropdownStatusBar = ({
2122
down: boolean;
2223
setter: Function;
2324
possibleValues: any[];
25+
onOpen: () => void;
2426
children: any;
2527
}) => {
2628
const theme = useTheme();

src/components/StatusBar/StatusBar.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,13 @@ const DefaultUniverseSelector = ({
227227
}
228228
};
229229

230+
const checkManager = () => {
231+
if (commsManager === null) {
232+
error("The Robotics Backend is disconnected. Make sure to reconnect.");
233+
throw Error("The Robotics Backend is disconnected. Make sure to reconnect.")
234+
}
235+
}
236+
230237
return (
231238
<DropdownStatusBar
232239
id="open-settings-manager"
@@ -235,6 +242,7 @@ const DefaultUniverseSelector = ({
235242
baseHeight={24}
236243
down={false}
237244
setter={selectUniverse}
245+
onOpen={checkManager}
238246
possibleValues={universeList}
239247
>
240248
<label>

0 commit comments

Comments
 (0)