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

Commit 572b43f

Browse files
committed
fix: code review
1 parent 29b6d1e commit 572b43f

File tree

5 files changed

+5
-94
lines changed

5 files changed

+5
-94
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,10 @@ const ipfs = IpfsApi({
277277

278278
- [name](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md)
279279
- [`ipfs.name.publish(addr, [options], [callback])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepublish)
280-
- [`ipfs.name.resolve(addr, [options], [callback])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#nameresolve)
281280
- [`ipfs.name.pubsub.cancel(arg, [callback])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubcancel)
282281
- [`ipfs.name.pubsub.state([callback])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubstate)
283282
- [`ipfs.name.pubsub.subs([callback])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#namepubsubsubs)
283+
- [`ipfs.name.resolve(addr, [options], [callback])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/NAME.md#nameresolve)
284284

285285
#### Node Management
286286

src/name/pubsub/cancel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const promisify = require('promisify-es6')
44

55
const transform = function (res, callback) {
66
callback(null, {
7-
canceled: res.Canceled
7+
canceled: res.Canceled === undefined || res.Canceled === true
88
})
99
}
1010

src/name/pubsub/subs.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
const promisify = require('promisify-es6')
44

55
const transform = function (res, callback) {
6-
callback(null, {
7-
strings: res.Strings
8-
})
6+
callback(null, res.Strings || [])
97
}
108

119
module.exports = (send) => {

test/interface.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,12 @@ describe('interface-ipfs-core tests', () => {
195195
// name.pubsub.cancel
196196
{
197197
name: 'should cancel a subscription correctly returning true',
198-
reasone: 'go-ipfs is really slow for publishing and resolving ipns records, unless in offline mode'
198+
reason: 'go-ipfs is really slow for publishing and resolving ipns records, unless in offline mode'
199199
},
200200
// name.pubsub.subs
201201
{
202202
name: 'should get the list of subscriptions updated after a resolve',
203-
reasone: 'go-ipfs is really slow for publishing and resolving ipns records, unless in offline mode'
203+
reason: 'go-ipfs is really slow for publishing and resolving ipns records, unless in offline mode'
204204
}
205205
]
206206
})

test/name-pubsub.spec.js

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)