Skip to content

Commit f0732a8

Browse files
committed
tweak
1 parent 8fe6f32 commit f0732a8

File tree

1 file changed

+2
-6
lines changed
  • packages/svelte/src/compiler/phases/3-transform/client/visitors/shared

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ import * as b from '../../../../../utils/builders.js';
99
* @returns {Expression | undefined}
1010
*/
1111
export function get_onchange(options, context) {
12-
if (!options) {
13-
return undefined;
14-
}
12+
if (!options) return;
1513

1614
if (options.type === 'ObjectExpression') {
1715
const onchange = /** @type {Property | undefined} */ (
@@ -24,9 +22,7 @@ export function get_onchange(options, context) {
2422
)
2523
);
2624

27-
if (!onchange) {
28-
return undefined;
29-
}
25+
if (!onchange) return;
3026

3127
return /** @type {Expression} */ (context.visit(onchange.value));
3228
}

0 commit comments

Comments
 (0)