Skip to content

Commit 24d4df3

Browse files
committed
chore: rename function
1 parent 8fda58a commit 24d4df3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/svelte/src/internal/client/dev/ownership.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function create_ownership_validator(props) {
2727
*/
2828
mutation: (prop, path, result, line, column) => {
2929
const name = path[0];
30-
if (is_bound(props, name) || !parent) {
30+
if (is_bound_or_unset(props, name) || !parent) {
3131
return result;
3232
}
3333

@@ -52,7 +52,7 @@ export function create_ownership_validator(props) {
5252
* @param {() => any} value
5353
*/
5454
binding: (key, child_component, value) => {
55-
if (!is_bound(props, key) && parent && value()?.[STATE_SYMBOL]) {
55+
if (!is_bound_or_unset(props, key) && parent && value()?.[STATE_SYMBOL]) {
5656
w.ownership_invalid_binding(
5757
component[FILENAME],
5858
key,
@@ -68,7 +68,7 @@ export function create_ownership_validator(props) {
6868
* @param {Record<string, any>} props
6969
* @param {string} prop_name
7070
*/
71-
function is_bound(props, prop_name) {
71+
function is_bound_or_unset(props, prop_name) {
7272
// Can be the case when someone does `mount(Component, props)` with `let props = $state({...})`
7373
// or `createClassComponent(Component, props)`
7474
const is_entry_props = STATE_SYMBOL in props || LEGACY_PROPS in props;

0 commit comments

Comments
 (0)