Skip to content

Commit a0393b2

Browse files
committed
don't need to check if value is object as it won't be literal
1 parent d703dca commit a0393b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/svelte/src/compiler/compile/Component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ export default class Component {
777777
if (node.type === 'VariableDeclaration' && node.kind === 'const') {
778778
immutable = true;
779779
for (const declaration of node.declarations) {
780-
if (declaration.init.type !== 'Literal' || typeof declaration.init.value === 'object') {
780+
if (declaration.init.type !== 'Literal') {
781781
immutable = false;
782782
}
783783
}

0 commit comments

Comments
 (0)