Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

fix: always close writer so iterator throws on error #3980

Merged
merged 1 commit into from
Dec 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/ipfs-core/src/components/dag/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ export function createExport ({ repo, preload, codecs }) {
cid,
writer,
codecs)
writer.close()
} catch (/** @type {any} */ e) {
err = e
} finally {
writer.close()
}
})()

Expand Down