Clear stale preview iframe errors (#65)
This commit is contained in:
@@ -99,10 +99,10 @@ export class IpcClient {
|
||||
"message" in data &&
|
||||
"appId" in data
|
||||
) {
|
||||
const { type, message, appId } = data as AppOutput;
|
||||
const { type, message, appId } = data as unknown as AppOutput;
|
||||
const callbacks = this.appStreams.get(appId);
|
||||
if (callbacks) {
|
||||
callbacks.onOutput({ type, message, appId });
|
||||
callbacks.onOutput({ type, message, appId, timestamp: Date.now() });
|
||||
}
|
||||
} else {
|
||||
showError(new Error(`[IPC] Invalid app output data received: ${data}`));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
export interface AppOutput {
|
||||
type: "stdout" | "stderr" | "info" | "client-error";
|
||||
message: string;
|
||||
timestamp: number;
|
||||
appId: number;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user