From f4367526dd21b31b2fadeb2ec4bd9e0cac987331 Mon Sep 17 00:00:00 2001 From: Christophe Diederichs Date: Thu, 12 Dec 2024 15:14:44 +0000 Subject: [PATCH] explicitly copy dependency data --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index b79c3e8..aa1b236 100644 --- a/index.js +++ b/index.js @@ -491,7 +491,7 @@ class HypercoreStorage { assert(this.destroyed === false) const s = new HypercoreStorage(this.root, this.discoveryKey, this.corePointer, this.dataPointer, this.db.snapshot()) - for (const dep of this.dependencies) s.dependencies.push(dep) + for (const { data, length } of this.dependencies) s.dependencies.push({ data, length }) return s }