Skip to content

Commit 7f47f86

Browse files
committed
fix
1 parent 8f39241 commit 7f47f86

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/svelte/src/compiler/phases/3-transform/client/visitors/CallExpression.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/** @import { Context } from '../types' */
33
import { dev, is_ignored } from '../../../../state.js';
44
import * as b from '#compiler/builders';
5-
import { get_rune } from '../../../scope.js';
5+
import { get_rune, UNKNOWN } from '../../../scope.js';
66
import { transform_inspect_rune } from '../../utils.js';
77
import { should_proxy } from '../utils.js';
88

@@ -82,7 +82,9 @@ export function CallExpression(node, context) {
8282
['debug', 'dir', 'error', 'group', 'groupCollapsed', 'info', 'log', 'trace', 'warn'].includes(
8383
node.callee.property.name
8484
) &&
85-
node.arguments.some((arg) => arg.type === 'SpreadElement' || !context.state.scope.evaluate(arg).is_known)
85+
node.arguments.some(
86+
(arg) => arg.type === 'SpreadElement' || !context.state.scope.evaluate(arg).values.has(UNKNOWN)
87+
)
8688
) {
8789
return b.call(
8890
node.callee,

packages/svelte/src/compiler/phases/scope.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { is_reserved, is_rune } from '../../utils.js';
1616
import { determine_slot } from '../utils/slot.js';
1717
import { validate_identifier_name } from './2-analyze/visitors/shared/utils.js';
1818

19-
const UNKNOWN = Symbol('unknown');
19+
export const UNKNOWN = Symbol('unknown');
2020
/** Includes `BigInt` */
2121
const NUMBER = Symbol('number');
2222
const STRING = Symbol('string');

0 commit comments

Comments
 (0)