Skip to content

Commit 1bca57c

Browse files
afterrequestdevice is now dispatched in error cases
Since microbit-foundation/microbit-connection#63 Remove workaround in the error handler.
1 parent 3727b12 commit 1bca57c

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@codemirror/view": "^6.26.3",
1717
"@emotion/react": "^11.11.4",
1818
"@emotion/styled": "^11.11.5",
19-
"@microbit/microbit-connection": "^0.0.0-alpha.36",
19+
"@microbit/microbit-connection": "^0.0.0-alpha.38",
2020
"@microbit/microbit-fs": "^0.10.0",
2121
"@sanity/block-content-to-react": "^3.0.0",
2222
"@sanity/image-url": "^1.0.1",

src/project/project-actions.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { Dialogs } from "../common/use-dialogs";
2020
import {
2121
ConnectionStatus,
2222
MicrobitWebUSBConnection,
23-
AfterRequestDevice,
2423
FlashDataError,
2524
DeviceError,
2625
DeviceErrorCode,
@@ -836,10 +835,6 @@ export class ProjectActions {
836835
finalFocusRef: FinalFocusRef
837836
) {
838837
if (e instanceof DeviceError) {
839-
this.device.dispatchTypedEvent(
840-
"afterrequestdevice",
841-
new AfterRequestDevice()
842-
);
843838
switch (e.code) {
844839
case "no-device-selected": {
845840
// User just cancelled the browser dialog, perhaps because there

0 commit comments

Comments
 (0)