mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-10-07 22:57:07 +00:00
Merge pull request #1233 from chengxilo/fix-typo
typo: change shoudStopTraverse to shouldStopTraverse
This commit is contained in:
commit
8fca6014e4
@ -42,7 +42,7 @@ const Index = ({ directory } = {}) => async () => {
|
|||||||
const isNotIndexed = async (hash) => !(await isIndexed(hash))
|
const isNotIndexed = async (hash) => !(await isIndexed(hash))
|
||||||
|
|
||||||
// Function to decide when the log traversal should be stopped
|
// Function to decide when the log traversal should be stopped
|
||||||
const shoudStopTraverse = async (entry) => {
|
const shouldStopTraverse = async (entry) => {
|
||||||
// Go through the nexts of an entry and if any is not yet
|
// Go through the nexts of an entry and if any is not yet
|
||||||
// indexed, add it to the list of entries-to-be-indexed
|
// indexed, add it to the list of entries-to-be-indexed
|
||||||
for await (const hash of entry.next) {
|
for await (const hash of entry.next) {
|
||||||
@ -56,7 +56,7 @@ const Index = ({ directory } = {}) => async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Traverse the log and stop when everything has been processed
|
// Traverse the log and stop when everything has been processed
|
||||||
for await (const entry of log.traverse(null, shoudStopTraverse)) {
|
for await (const entry of log.traverse(null, shouldStopTraverse)) {
|
||||||
const { hash, payload } = entry
|
const { hash, payload } = entry
|
||||||
// If an entry is not yet indexed, process it
|
// If an entry is not yet indexed, process it
|
||||||
if (await isNotIndexed(hash)) {
|
if (await isNotIndexed(hash)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user