Skip to content
This repository was archived by the owner on Aug 12, 2020. It is now read-only.

Commit 3b48607

Browse files
committed
fix: backport cid version fix to 0.30.x
1 parent e7b671e commit 3b48607

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/builder/builder.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const defaultOptions = {
2626

2727
module.exports = function builder (createChunker, ipld, createReducer, _options) {
2828
const options = extend({}, defaultOptions, _options)
29+
options.cidVersion = options.cidVersion || 0
2930

3031
return function (source) {
3132
return function (items, cb) {

src/importer/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const defaultOptions = {
2525

2626
module.exports = function (ipld, _options) {
2727
const options = Object.assign({}, defaultOptions, _options)
28+
options.cidVersion = options.cidVersion || 0
2829

2930
if (options.cidVersion > 0 && _options.rawLeaves === undefined) {
3031
// if the cid version is 1 or above, use raw leaves as this is

0 commit comments

Comments
 (0)