Skip to content

Commit

Permalink
Evitar erro de evento inválido no web worker
Browse files Browse the repository at this point in the history
  • Loading branch information
dgadelha committed May 1, 2024
1 parent 6f1bc78 commit 8672f42
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/runner/src/runners/PortugolWebWorkersRunner.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PortugolJsRuntime } from "@portugol-webstudio/runtime";
import { Subscription, Subject } from "rxjs";
import { Subject, Subscription } from "rxjs";

import { PortugolEvent, IPortugolRunner } from "./IPortugolRunner.js";
import { IPortugolRunner, PortugolEvent } from "./IPortugolRunner.js";

export class PortugolWebWorkersRunner extends IPortugolRunner {
private worker: Worker;
Expand Down Expand Up @@ -162,6 +162,10 @@ export class PortugolWebWorkersRunner extends IPortugolRunner {
break;
}

case "started": {
break;
}

default: {
throw new Error(`Unknown message type: ${message.data.type}`);
}
Expand Down

0 comments on commit 8672f42

Please sign in to comment.