This repository was archived by the owner on Apr 29, 2019. It is now read-only.
Fix multiple anchors bug #82
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I found a bug in the anchors zome that prevents the creation of a new anchor type once the root anchor has been committed.
This can be seen in the newly added test case in anchors.json. The first new anchor type passes but fails creating a second type. This was not tested for previously.
This bug was caused by an error in anchors.js where the variable rootAnchorTypeHash was set to the response of a get() rather than the hash itself. This was then used as the base of a link, causing an error. This only occurrerd in the conditional branch where the root anchor had already been created.
Bug is fixed and an additional test case included.