Skip to content

Commit

Permalink
Merge pull request #707 from wolfmanstout/threatened_branch_fix
Browse files Browse the repository at this point in the history
Fixed threatened_branch() to exclude extinct species.
  • Loading branch information
jrosindell authored Dec 11, 2024
2 parents aa8e251 + d101a78 commit 5c818ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions OZprivate/rawJS/OZTreeModule/src/factory/midnode.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,11 @@ class Midnode {
num_threatened += this.get_attribute("iucnEN");
num_threatened += this.get_attribute("iucnCR");
}
let num_extant = this.richness_val - (this.get_attribute("iucnEX") + this.get_attribute("iucnEW"));
if (this.detail_fetched) {
this._threatened_branch = (num_threatened > this.richness_val * 0.5);
this._threatened_branch = (num_threatened > num_extant * 0.5);
}
return num_threatened > this.richness_val * 0.5;
return num_threatened > num_extant * 0.5;
}
get redlist() {
if (this._redlist !== null) return this._redlist;
Expand Down

0 comments on commit 5c818ac

Please sign in to comment.