We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6d7fca commit e1cfa14Copy full SHA for e1cfa14
packages/svelte/src/internal/client/runtime.js
@@ -1800,12 +1800,14 @@ export function pop(accessors) {
1800
1801
/**
1802
* @param {any} value
1803
+ * @param {Set<any>} visited
1804
* @returns {void}
1805
*/
-function deep_read(value) {
1806
- if (typeof value === 'object' && value !== null) {
+function deep_read(value, visited = new Set()) {
1807
+ if (typeof value === 'object' && value !== null && !visited.has(value)) {
1808
+ visited.add(value);
1809
for (let key in value) {
- deep_read(value[key]);
1810
+ deep_read(value[key], visited);
1811
}
1812
const proto = Object.getPrototypeOf(value);
1813
if (
0 commit comments