Skip to content

Commit

Permalink
update logic in sink-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpaige committed Jan 2, 2025
1 parent 86aec81 commit 59d36e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/libs/sink-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,16 @@ export function getDomainAndNamespace<T extends BaseIndex>(

export function getDomainAndNamespace(baseIndex?: BaseIndex) {
const domain = process.env.osDomain;
const indexNamespace = process.env.indexNamespace || "";

if (domain === undefined) {
throw new Error("osDomain is undefined in environment variables");
}

if (indexNamespace !== "" && indexNamespace === undefined) {
if (indexNamespace === undefined) {
throw new Error("indexName is undefined in environment variables");
}

const indexNamespace = process.env.indexNamespace || "";
const index = `${indexNamespace}${baseIndex}`;

return { index, domain };
Expand Down

0 comments on commit 59d36e3

Please sign in to comment.