Skip to content

Commit fec57e2

Browse files
authored
chore: tweak add_locations (#11761)
1 parent 4a708dd commit fec57e2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/svelte/src/internal/client/dev/elements.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { HYDRATION_END, HYDRATION_START } from '../../../constants.js';
22
import { hydrating } from '../dom/hydration.js';
3-
import { is_array } from '../utils.js';
43

54
/**
65
* @param {any} fn
@@ -12,7 +11,7 @@ export function add_locations(fn, filename, locations) {
1211
return (/** @type {any[]} */ ...args) => {
1312
const dom = fn(...args);
1413

15-
var node = hydrating && is_array(dom) ? dom[0] : dom.nodeType === 11 ? dom.firstChild : dom;
14+
var node = hydrating ? dom : dom.nodeType === 11 ? dom.firstChild : dom;
1615
assign_locations(node, filename, locations);
1716

1817
return dom;

0 commit comments

Comments
 (0)