Open kodikonas opened 1 year ago
The solution to this lesson is wrong.
The: const result = []; should be replaced with: let result = []; or var result = [];
The current solution for reference: const traversePosts = async (cid) => { const result = [] while (cid) { result.push(cid) const current = await ipfs.dag.get(cid) const prev = current.value.prev if (prev) { cid = prev } else { return result } } }
The solution to this lesson is wrong.
The: const result = []; should be replaced with: let result = []; or var result = [];
The current solution for reference: const traversePosts = async (cid) => { const result = [] while (cid) { result.push(cid) const current = await ipfs.dag.get(cid) const prev = current.value.prev if (prev) { cid = prev } else { return result } } }