Skip to content

Commit 8b4e1fc

Browse files
authored
chore: extract a couple of drive-by fixes from other branch (#16772)
* chore: extract a couple of drive-by fixes from other branch * more
1 parent a059801 commit 8b4e1fc

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/svelte/src/internal/client/dom/operations.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ export function child(node, is_text) {
130130

131131
/**
132132
* Don't mark this as side-effect-free, hydration needs to walk all nodes
133-
* @param {DocumentFragment | TemplateNode[]} fragment
134-
* @param {boolean} is_text
133+
* @param {DocumentFragment | TemplateNode | TemplateNode[]} fragment
134+
* @param {boolean} [is_text]
135135
* @returns {Node | null}
136136
*/
137-
export function first_child(fragment, is_text) {
137+
export function first_child(fragment, is_text = false) {
138138
if (!hydrating) {
139139
// when not hydrating, `fragment` is a `DocumentFragment` (the result of calling `open_frag`)
140140
var first = /** @type {DocumentFragment} */ (get_first_child(/** @type {Node} */ (fragment)));

packages/svelte/src/internal/client/dom/template.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,9 @@ export function text(value = '') {
316316
return node;
317317
}
318318

319+
/**
320+
* @returns {TemplateNode | DocumentFragment}
321+
*/
319322
export function comment() {
320323
// we're not delegating to `template` here for performance reasons
321324
if (hydrating) {

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ import {
1010
INERT,
1111
RENDER_EFFECT,
1212
ROOT_EFFECT,
13-
USER_EFFECT,
1413
MAYBE_DIRTY
1514
} from '#client/constants';
1615
import { async_mode_flag } from '../../flags/index.js';
1716
import { deferred, define_property } from '../../shared/utils.js';
18-
import { get_boundary } from '../dom/blocks/boundary.js';
1917
import {
2018
active_effect,
2119
is_dirty,
@@ -30,7 +28,6 @@ import { DEV } from 'esm-env';
3028
import { invoke_error_boundary } from '../error-handling.js';
3129
import { old_values } from './sources.js';
3230
import { unlink_effect } from './effects.js';
33-
import { unset_context } from './async.js';
3431

3532
/** @type {Set<Batch>} */
3633
const batches = new Set();

0 commit comments

Comments
 (0)