Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Commit

Permalink
fix: specify default codec
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Jan 9, 2020
1 parent 111ed8e commit 4b79619
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/persist.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ const persist = (node, ipld, options) => {
options.codec = 'raw'
}

if (!options.codec) {
options.codec = 'dag-pb'
}

if (isNaN(options.hashAlg)) {
options.hashAlg = mh.names[options.hashAlg]
}
Expand Down

0 comments on commit 4b79619

Please sign in to comment.