Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/react-duckdb/src/platform_provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ export const DuckDBPlatform: React.FC<PlatformProps> = (props: PlatformProps) =>
if (inFlight.current) return await inFlight.current;
inFlight.current = (async () => {
try {
const params = new URLSearchParams(window.location.search);
const bundleName = params.get('bundle') as keyof duckdb.DuckDBBundles | null;
setBundle(b => b.updateRunning());
const next = await duckdb.selectBundle(props.bundles);

const bundle = bundleName !== null ? props.bundles[bundleName] : null;
const next = (bundle || (await duckdb.selectBundle(props.bundles))) as duckdb.DuckDBBundle;
inFlight.current = null;
setBundle(b => b.completeWith(next));
return next;
Expand Down