Skip to content

Commit 060caa0

Browse files
committed
tidy up
1 parent 3068948 commit 060caa0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export function client_component(source, analysis, options) {
238238
(binding.kind === 'prop' || binding.kind === 'bindable_prop') && !name.startsWith('$$')
239239
);
240240

241-
if (analysis.runes && dev) {
241+
if (dev && analysis.runes) {
242242
const exports = analysis.exports.map(({ name, alias }) => b.literal(alias ?? name));
243243
/** @type {ESTree.Literal[]} */
244244
const bindable = [];
@@ -345,10 +345,10 @@ export function client_component(source, analysis, options) {
345345
}
346346

347347
const should_inject_context =
348+
dev ||
348349
analysis.needs_context ||
349350
analysis.reactive_statements.size > 0 ||
350-
component_returned_object.length > 0 ||
351-
dev;
351+
component_returned_object.length > 0;
352352

353353
if (should_inject_context) {
354354
component_block.body.unshift(b.stmt(b.call('$.push', ...push_args)));

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export const javascript_visitors_runes = {
167167
);
168168
}
169169

170-
if ((field.kind === 'derived' || field.kind === 'derived_call') && dev) {
170+
if (dev && (field.kind === 'derived' || field.kind === 'derived_call')) {
171171
body.push(
172172
b.method(
173173
'set',

0 commit comments

Comments
 (0)