mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix: coalesce types and use a default
@aarushik93 is this okay?
This commit is contained in:
@@ -3,14 +3,14 @@ import { ReactNode } from "react";
|
||||
|
||||
export function LaunchDarklyProvider({ children }: { children: ReactNode }) {
|
||||
if (
|
||||
process.env.NEXT_PUBLIC_LAUNCHDARKLY_ENABLED === true &&
|
||||
process.env.NEXT_PUBLIC_LAUNCHDARKLY_ENABLED === "true" &&
|
||||
!process.env.NEXT_PUBLIC_LAUNCHDARKLY_CLIENT_ID
|
||||
) {
|
||||
throw new Error("NEXT_PUBLIC_LAUNCHDARKLY_CLIENT_ID is not defined");
|
||||
}
|
||||
|
||||
return (
|
||||
<LDProvider clientSideID={process.env.NEXT_PUBLIC_LAUNCHDARKLY_CLIENT_ID}>
|
||||
<LDProvider clientSideID={process.env.NEXT_PUBLIC_LAUNCHDARKLY_CLIENT_ID ?? ""}>
|
||||
{children}
|
||||
</LDProvider>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user