Skip to content

Commit

Permalink
quick fixes for KM
Browse files Browse the repository at this point in the history
  • Loading branch information
Eryk Solecki committed Apr 21, 2023
1 parent dc8e040 commit 1d1c761
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/host/src/lib/streamWrapper/baseStreamWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ export abstract class BaseStreamWrapper<WrappedStream extends Stream> implements

static hasWrapperData<WrappedStream extends Stream>(stream: WrappedStream) { return "wrapperData" in stream; }
static retriveWrapperData<WrappedStream extends Stream>(stream: WrappedStream): WrapperData {
if (!this.hasWrapperData) throw new Error("Stream doesn't contain wrapper data");
// TODO: Add after KM, remove return || default values
// if (!this.hasWrapperData) throw new Error("Stream doesn't contain wrapper data");
const wrappedData: WrapperData = (stream as any).wrapperData;

return {
id: wrappedData.id,
type: wrappedData.type,
origin: wrappedData.origin,
options: wrappedData.options,
id: wrappedData.id || "",
type: wrappedData.type || "instance",
origin: wrappedData.origin || { id: "", type: "hub" },
options: wrappedData.options || {},
};
}

Expand Down

0 comments on commit 1d1c761

Please sign in to comment.