Skip to content

Commit 720d79c

Browse files
authored
Merge pull request #250 from Open-STEM/kq-bugs
Kq bugs
2 parents ea26c19 + 4c9b4a6 commit 720d79c

5 files changed

Lines changed: 12 additions & 11 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"homepage": "https://experientialrobotics.org/",
55
"license": "GPL-2.0-only",
66
"private": true,
7-
"version": "2.0.20",
7+
"version": "2.0.21",
88
"type": "module",
99
"scripts": {
1010
"dev": "vite",
@@ -111,4 +111,4 @@
111111
"vite-plugin-static-copy": "^2.3.0",
112112
"vitest": "^3.0.0"
113113
}
114-
}
114+
}

public/CHANGELOG.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Version 2.0.20
1+
# Version 2.0.21
22

33
#### XRPCode V2 Beta What’s New
44
* Rewritten with modern web tools for more solid and expandable future

src/components/dialogs/driver-installs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function XRPDriverInstallDlg({toggleDialog}: XRPDriverInstallsProps) {
4141
}
4242

4343
try {
44-
const response = await fetch('/drivers/drivers.json');
44+
const response = await fetch('drivers/drivers.json');
4545
if (!response.ok) {
4646
throw new Error('Network response was not ok');
4747
}

src/components/navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ function NavBar({ layoutref }: NavBarProps) {
299299
});
300300

301301
AppMgr.getInstance().on(EventType.EVENT_HIDE_BLUETOOTH_CONNECTING, () => {
302-
toggleDialog();
303302
setDialogContent(<div />);
303+
toggleDialog();
304304
});
305305

306306
hasSubscribed = true;

src/managers/pluginmgr.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export default class PluginMgr {
189189
private async loadPluginBlocks(blocksUrl: string): Promise<PluginBlock[] | null> {
190190

191191
if (process.env.NODE_ENV === 'development') {
192-
blocksUrl = '/public' + blocksUrl;
192+
blocksUrl = '/public/' + blocksUrl;
193193
}
194194

195195
try {
@@ -209,18 +209,19 @@ export default class PluginMgr {
209209
* Load a script dynamically (module import with fallback)
210210
*/
211211
private async loadScript(scriptUrl: string): Promise<void> {
212-
if (process.env.NODE_ENV === 'development') {
213-
scriptUrl = '/public' + scriptUrl;
214-
}
212+
if (process.env.NODE_ENV === 'development') {
213+
scriptUrl = '/public/' + scriptUrl;
214+
} else {
215+
scriptUrl = '../' + scriptUrl;
216+
}
215217

216218
if (this.loadedScripts.has(scriptUrl)) {
217219
return; // Already loaded
218220
}
219221

220222
try {
221223
// Dynamic import of the plugin script
222-
const url = scriptUrl;
223-
await import(/* @vite-ignore */ url);
224+
await import(/* @vite-ignore */ scriptUrl);
224225
this.loadedScripts.add(scriptUrl);
225226
} catch (error) {
226227
console.error(`Error loading script ${scriptUrl}:`, error);

0 commit comments

Comments
 (0)