Skip to content

Commit c9cf7e3

Browse files
committed
tweak
1 parent 1253886 commit c9cf7e3

File tree

1 file changed

+1
-2
lines changed
  • packages/svelte/src/internal/client/reactivity

1 file changed

+1
-2
lines changed

packages/svelte/src/internal/client/reactivity/props.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ function has_destroyed_component_ctx(current_value) {
259259
* @returns {(() => V | ((arg: V) => V) | ((arg: V, mutation: boolean) => V))}
260260
*/
261261
export function prop(props, key, flags, fallback) {
262-
var immutable = (flags & PROPS_IS_IMMUTABLE) !== 0;
263262
var runes = !legacy_mode_flag || (flags & PROPS_IS_RUNES) !== 0;
264263
var bindable = (flags & PROPS_IS_BINDABLE) !== 0;
265264
var lazy = (flags & PROPS_IS_LAZY_INITIAL) !== 0;
@@ -361,7 +360,7 @@ export function prop(props, key, flags, fallback) {
361360

362361
// prop is written to, but there's no binding, which means we
363362
// create a derived that we can write to locally
364-
var d = (immutable ? derived : derived_safe_equal)(getter);
363+
var d = ((flags & PROPS_IS_IMMUTABLE) !== 0 ? derived : derived_safe_equal)(getter);
365364

366365
// Capture the initial value if it's bindable
367366
if (bindable) get(d);

0 commit comments

Comments
 (0)