Skip to content

Commit

Permalink
0-length element bug for backbone
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoisot committed Nov 3, 2021
1 parent b1a5953 commit 58f0dae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Mangal"
uuid = "b8b640a6-63d9-51e6-b784-5033db27bef2"
authors = ["Timothée Poisot <[email protected]>"]
version = "0.4.1"
version = "0.4.2"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
3 changes: 2 additions & 1 deletion src/backbone.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
Returns the backbone entry for a taxon, matched by *exact* name.
"""
function backbone(name::AbstractString)
return first(backbones(Pair("name", name)))
q = backbones(Pair("name", name))
return isequal(1)(length(q)) ? only(q) : nothing
end

2 comments on commit 58f0dae

@tpoisot
Copy link
Member Author

@tpoisot tpoisot commented on 58f0dae Nov 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/48081

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.2 -m "<description of version>" 58f0daeade27425f989a3acb20d2069b575112ec
git push origin v0.4.2

Please sign in to comment.