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

Commit 58e3655

Browse files
authored
Merge pull request #286 from ipfs/fix/object-patch-before
fix: wait for put in object.patch.addLink before hook
2 parents b098c05 + 31c52d1 commit 58e3655

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

js/src/object.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,6 @@ module.exports = (common) => {
680680
let testNodeMultihash
681681
let testNodeWithLinkMultihash
682682
let testLink
683-
let testLinkPlainObject
684683

685684
const obj = {
686685
Data: Buffer.from('patch test object'),
@@ -699,7 +698,6 @@ module.exports = (common) => {
699698
let node1a
700699
let node1b
701700
let node2
702-
let node3
703701

704702
series([
705703
(cb) => {
@@ -928,10 +926,10 @@ module.exports = (common) => {
928926
}
929927

930928
before(() => {
931-
return ipfs.object.put(obj, (err, node) => {
932-
expect(err).to.not.exist()
933-
testNodeMultihash = node.multihash
934-
})
929+
return ipfs.object.put(obj)
930+
.then((node) => {
931+
testNodeMultihash = node.multihash
932+
})
935933
})
936934

937935
it('.addLink', () => {

0 commit comments

Comments
 (0)