hypercore-storage 2.5.6 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +6 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -107,6 +107,11 @@ class HypercoreStorage {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
setDependencyHead(dep) {
|
|
110
|
+
if (dep === null) {
|
|
111
|
+
this.core.dependencies = []
|
|
112
|
+
return
|
|
113
|
+
}
|
|
114
|
+
|
|
110
115
|
const deps = this.core.dependencies
|
|
111
116
|
|
|
112
117
|
for (let i = deps.length - 1; i >= 0; i--) {
|
|
@@ -127,6 +132,7 @@ class HypercoreStorage {
|
|
|
127
132
|
dataPointer: dep.dataPointer,
|
|
128
133
|
length: dep.length
|
|
129
134
|
}
|
|
135
|
+
return // updated head so done
|
|
130
136
|
}
|
|
131
137
|
|
|
132
138
|
this.core.dependencies = [
|