Skip to content

Commit 40b2823

Browse files
committed
fix
1 parent 341fc54 commit 40b2823

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

packages/repl/src/lib/Output/Viewer.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
export let injectedCSS = '';
2525
export let theme: 'light' | 'dark';
2626
/** A store containing the current bundle result. Takes precedence over REPL context, if set */
27-
export let bundle: Writable<Bundle> | undefined = undefined;
27+
export let bundle: Writable<Bundle | null> | undefined = undefined;
2828
/** Called everytime a log is pushed. If this is set, the built-in console coming with the Viewer isn't shown */
2929
export let onLog: ((logs: Log[]) => void) | undefined = undefined;
3030
3131
const context = get_repl_context();
32-
bundle = bundle ?? context?.bundle;
32+
bundle = bundle ?? context.bundle;
3333
3434
let logs: Log[] = [];
3535
let log_group_stack: Log[][] = [];
@@ -98,7 +98,7 @@
9898
9999
$: if (ready) proxy?.iframe_command('set_theme', { theme });
100100
101-
async function apply_bundle($bundle: Bundle | null) {
101+
async function apply_bundle($bundle: Bundle | null | undefined) {
102102
if (!$bundle) return;
103103
104104
try {

packages/repl/src/lib/workers/bundler/plugins/commonjs.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ const plugin: Plugin = {
1919
ecmaVersion: 'latest'
2020
});
2121

22-
/** @type {string[]} */
23-
const requires = [];
22+
const requires: string[] = [];
2423

2524
walk(ast as Node, null, {
2625
CallExpression: (node) => {

0 commit comments

Comments
 (0)