rm-bytes
Ben McCann 6 months ago
parent 0ed05cfcc0
commit 0f4c7e807c

@ -371,7 +371,7 @@ function reconcile_tracked_array(
if (is_controlled && a) {
clear_text_content(dom);
}
while (a > 0) {
while (a) {
block = a_blocks[--a];
destroy_each_item_block(block, active_transitions, apply_transitions, is_controlled);
}
@ -387,7 +387,7 @@ function reconcile_tracked_array(
/** @type {Node} */
var hydrating_node = current_hydration_fragment[0];
while (b > 0) {
while (b) {
// Hydrate block
idx = b_end - --b;
item = array[idx];
@ -406,7 +406,7 @@ function reconcile_tracked_array(
}
} else if (!a) {
// Create new blocks
while (b > 0) {
while (b) {
idx = b_end - --b;
item = array[idx];
key = is_computed_key ? keys[idx] : item;
@ -502,7 +502,7 @@ function reconcile_tracked_array(
var should_create;
if (is_animated) {
var i = b_length;
while (i-- > 0) {
while (i--) {
b_end = i + start;
a = sources[i];
if (pos === MOVED_BLOCK) {
@ -514,7 +514,7 @@ function reconcile_tracked_array(
}
var last_block;
var last_sibling;
while (b_length-- > 0) {
while (b_length--) {
b_end = b_length + start;
a = sources[b_length];
should_create = a === -1;
@ -597,7 +597,7 @@ function mark_lis(a) {
}
if (k < a[index[lo]]) {
if (lo > 0) {
if (lo) {
parent[i] = index[lo - 1];
}
index[lo] = i;
@ -657,7 +657,7 @@ function get_first_child(block) {
function destroy_active_transition_blocks(active_transitions) {
var length = active_transitions.length;
if (length > 0) {
if (length) {
var i = 0;
var block;
var transition;

@ -371,7 +371,7 @@ function execute_signal_fn(signal) {
}
}
if (dependencies && current_dependencies_index > 0) {
if (dependencies && current_dependencies_index) {
dependencies.length = current_dependencies_index + current_dependencies.length;
for (i = 0; i < current_dependencies.length; i++) {
dependencies[current_dependencies_index + i] = current_dependencies[i];
@ -520,7 +520,7 @@ export function execute_effect(signal) {
if (
is_runes(component_context) && // Don't rerun pre effects more than once to accomodate for "$: only runs once" behavior
signal.f & PRE_EFFECT &&
current_queued_pre_and_render_effects.length > 0
current_queued_pre_and_render_effects.length
) {
flush_local_pre_effects(component_context);
}
@ -545,7 +545,7 @@ function infinite_loop_guard() {
*/
function flush_queued_effects(effects) {
const length = effects.length;
if (length > 0) {
if (length) {
infinite_loop_guard();
let i;
for (i = 0; i < length; i++) {
@ -566,7 +566,7 @@ function flush_queued_effects(effects) {
function process_microtask() {
is_micro_task_queued = false;
if (current_queued_microtasks.length > 0) {
if (current_queued_microtasks.length) {
const tasks = current_queued_microtasks.slice();
current_queued_microtasks = [];
run_all(tasks);
@ -698,7 +698,7 @@ export function flushSync(fn) {
if (fn) {
fn();
}
if (current_queued_pre_and_render_effects.length > 0 || effects.length > 0) {
if (current_queued_pre_and_render_effects.length || effects.length) {
flushSync();
}
if (is_micro_task_queued) {
@ -1551,7 +1551,7 @@ export function prop(props, key, flags, initial) {
get(inner_current_value);
}
if (arguments.length > 0) {
if (arguments.length) {
if (mutation || (immutable ? value !== current : safe_not_equal(value, current))) {
from_child = true;
set(inner_current_value, mutation ? current : value);

@ -569,7 +569,7 @@ export function trigger_transitions(transitions, target_direction, from) {
mark_subtree_inert(transition.e, true);
}
}
if (outros.length > 0) {
if (outros.length) {
// Defer the outros to a microtask
const e = managed_pre_effect(() => {
destroy_signal(e);

Loading…
Cancel
Save