We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fe6f32 commit f0732a8Copy full SHA for f0732a8
packages/svelte/src/compiler/phases/3-transform/client/visitors/shared/state.js
@@ -9,9 +9,7 @@ import * as b from '../../../../../utils/builders.js';
9
* @returns {Expression | undefined}
10
*/
11
export function get_onchange(options, context) {
12
- if (!options) {
13
- return undefined;
14
- }
+ if (!options) return;
15
16
if (options.type === 'ObjectExpression') {
17
const onchange = /** @type {Property | undefined} */ (
@@ -24,9 +22,7 @@ export function get_onchange(options, context) {
24
22
)
25
23
);
26
27
- if (!onchange) {
28
29
+ if (!onchange) return;
30
31
return /** @type {Expression} */ (context.visit(onchange.value));
32
}
0 commit comments