Skip to content

Commit 6c4a2b2

Browse files
committed
chore: rename get_states_and_call to get_states_and_calls
1 parent 5275418 commit 6c4a2b2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import {
3232
build_template_literal,
3333
build_update,
3434
build_update_assignment,
35-
get_states_and_call
35+
get_states_and_calls
3636
} from './shared/utils.js';
3737
import { visit_event_attribute } from './shared/events.js';
3838

@@ -319,7 +319,7 @@ export function RegularElement(node, context) {
319319
const states_and_calls =
320320
trimmed.every((node) => node.type === 'Text' || node.type === 'ExpressionTag') &&
321321
trimmed.some((node) => node.type === 'ExpressionTag') &&
322-
get_states_and_call(trimmed);
322+
get_states_and_calls(trimmed);
323323

324324
if (states_and_calls && states_and_calls.states === 0) {
325325
child_state.init.push(

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { locator } from '../../../../../state.js';
1313
/**
1414
* @param {Array<AST.Text | AST.ExpressionTag>} values
1515
*/
16-
export function get_states_and_call(values) {
16+
export function get_states_and_calls(values) {
1717
let states = 0;
1818
let calls = 0;
1919
for (let i = 0; i < values.length; i++) {
@@ -44,7 +44,7 @@ export function build_template_literal(values, visit, state) {
4444
let quasi = b.quasi('');
4545
const quasis = [quasi];
4646

47-
const { states, calls } = get_states_and_call(values);
47+
const { states, calls } = get_states_and_calls(values);
4848

4949
let has_call = calls > 0;
5050
let has_state = states > 0;

0 commit comments

Comments
 (0)