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

Commit

Permalink
fix(resolver): detect protobuf encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshyx committed Oct 13, 2016
1 parent 061baf2 commit 9dbac36
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/IpfsApiHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,12 @@ export class IpfsApiHelper {
return reject(new Error('Path could not be resolved'));
}
// is a link
if (previousObj[chunk].hasOwnProperty(IpfsApiHelper.LINK_SYMBOL)) {
if (previousObj[chunk].hasOwnProperty(IpfsApiHelper.LINK_SYMBOL) &&
previousObj[chunk].hasOwnProperty(IpfsApiHelper.ENC_SYMBOL)
) {
this.get(
previousObj[chunk][IpfsApiHelper.LINK_SYMBOL],
previousObj[chunk].hasOwnProperty(IpfsApiHelper.ENC_PROTOBUF))
previousObj[chunk][IpfsApiHelper.ENC_SYMBOL] === IpfsApiHelper.ENC_PROTOBUF)
.then((discoveredNode: any) => {
currentIndex++;
step(discoveredNode);
Expand Down

0 comments on commit 9dbac36

Please sign in to comment.