File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -154,20 +154,20 @@ export function wrapWindowsScripts(js, replacements) {
154
154
delete window.chrome.webview.addEventListener;
155
155
delete window.chrome.webview.removeEventListener;
156
156
if (typeof Bluetooth === 'undefined') {
157
- globalThis.Bluetooth = { requestDevice: async () => { /* noop */ } }
157
+ globalThis.Bluetooth.prototype = { requestDevice: async () => { /* noop */ } }
158
158
}
159
159
// @ts-expect-error - testing
160
160
if (typeof USB === 'undefined') {
161
- globalThis.USB = { requestDevice: async () => { /* noop */ } }
161
+ globalThis.USB.prototype = { requestDevice: async () => { /* noop */ } }
162
162
}
163
163
164
164
// @ts-expect-error - testing
165
165
if (typeof Serial === 'undefined') {
166
- globalThis.Serial = { requestPort: async () => { /* noop */ } }
166
+ globalThis.Serial.prototype = { requestPort: async () => { /* noop */ } }
167
167
}
168
168
// @ts-expect-error - testing
169
169
if (typeof HID === 'undefined') {
170
- globalThis.HID = { requestDevice: async () => { /* noop */ } }
170
+ globalThis.HID.prototype = { requestDevice: async () => { /* noop */ } }
171
171
}
172
172
${ js }
173
173
} catch (e) {
You can’t perform that action at this time.
0 commit comments