pull/10542/head
Rich Harris 3 years ago
parent f807eac4c7
commit d75f197358

@ -6,6 +6,7 @@ import {
EACH_ITEM_REACTIVE, EACH_ITEM_REACTIVE,
EACH_KEYED EACH_KEYED
} from '../../../../constants.js'; } from '../../../../constants.js';
import { noop } from '../../../common.js';
import { EACH_BLOCK, EACH_ITEM_BLOCK } from '../../block.js'; import { EACH_BLOCK, EACH_ITEM_BLOCK } from '../../block.js';
import { import {
current_hydration_fragment, current_hydration_fragment,
@ -33,8 +34,6 @@ const NEW_BLOCK = -1;
const MOVED_BLOCK = 99999999; const MOVED_BLOCK = 99999999;
const LIS_BLOCK = -2; const LIS_BLOCK = -2;
function no_op() {}
/** /**
* @param {number} flags * @param {number} flags
* @param {Element | Comment} anchor * @param {Element | Comment} anchor
@ -211,7 +210,7 @@ function each(anchor_node, collection, flags, key_fn, render_fn, fallback_fn, re
if (key_fn !== null) { if (key_fn !== null) {
keys = array.map(key_fn); keys = array.map(key_fn);
} else if ((flags & EACH_KEYED) === 0) { } else if ((flags & EACH_KEYED) === 0) {
array.map(no_op); array.map(noop);
} }
const length = array.length; const length = array.length;

Loading…
Cancel
Save