pull/12808/head
Rich Harris 2 years ago
parent 95eaf344e8
commit 7a25e04832

@ -6,7 +6,7 @@ import {
EACH_INDEX_REACTIVE,
EACH_IS_ANIMATED,
EACH_IS_CONTROLLED,
EACH_IS_STRICT_EQUALS,
EACH_ITEM_IMMUTABLE,
EACH_ITEM_REACTIVE,
EACH_KEYED
} from '../../../../../constants.js';
@ -82,7 +82,7 @@ export function EachBlock(node, context) {
}
if (context.state.analysis.runes && !uses_store) {
flags |= EACH_IS_STRICT_EQUALS;
flags |= EACH_ITEM_IMMUTABLE;
}
// Since `animate:` can only appear on elements that are the sole child of a keyed each block,

@ -5,7 +5,7 @@ export const EACH_KEYED = 1 << 2;
/** See EachBlock interface metadata.is_controlled for an explanation what this is */
export const EACH_IS_CONTROLLED = 1 << 3;
export const EACH_IS_ANIMATED = 1 << 4;
export const EACH_IS_STRICT_EQUALS = 1 << 6;
export const EACH_ITEM_IMMUTABLE = 1 << 5;
export const PROPS_IS_IMMUTABLE = 1;
export const PROPS_IS_RUNES = 1 << 1;

@ -3,7 +3,7 @@ import {
EACH_INDEX_REACTIVE,
EACH_IS_ANIMATED,
EACH_IS_CONTROLLED,
EACH_IS_STRICT_EQUALS,
EACH_ITEM_IMMUTABLE,
EACH_ITEM_REACTIVE,
HYDRATION_END,
HYDRATION_START_ELSE
@ -457,7 +457,7 @@ function create_item(anchor, state, prev, next, value, key, index, render_fn, fl
try {
var reactive = (flags & EACH_ITEM_REACTIVE) !== 0;
var mutable = (flags & EACH_IS_STRICT_EQUALS) === 0;
var mutable = (flags & EACH_ITEM_IMMUTABLE) === 0;
var v = reactive ? (mutable ? mutable_source(value) : source(value)) : value;
var i = (flags & EACH_INDEX_REACTIVE) === 0 ? index : source(index);

Loading…
Cancel
Save