Skip to content

Commit

Permalink
fix e2e tests (#21380)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Reuter authored and jbfbell committed Jan 13, 2023
1 parent 1441218 commit 974915e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions airbyte-webapp/src/components/connectorBuilder/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
SubstreamSlicer,
SubstreamSlicerType,
CartesianProductStreamSlicer,
DeclarativeStreamSchemaLoader,
} from "core/request/ConnectorManifest";

export interface BuilderFormInput {
Expand Down Expand Up @@ -506,14 +507,16 @@ function builderFormStreamSlicerToStreamSlicer(
};
}

function parseSchemaString(schema?: string) {
const EMPTY_SCHEMA = { type: "InlineSchemaLoader", schema: {} };

function parseSchemaString(schema?: string): DeclarativeStreamSchemaLoader {
if (!schema) {
return undefined;
return EMPTY_SCHEMA;
}
try {
return { type: "InlineSchemaLoader", schema: JSON.parse(schema) };
} catch {
return undefined;
return EMPTY_SCHEMA;
}
}

Expand Down

0 comments on commit 974915e

Please sign in to comment.