Skip to content

Commit

Permalink
ui: Fix existence probability output
Browse files Browse the repository at this point in the history
  • Loading branch information
tobifalk authored and cassava committed Jan 7, 2021
1 parent 75fb6c5 commit d77a66a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/components/rendering.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -693,10 +693,10 @@ class Rendering extends Component {

createDefaultLabelText = (object) => {
let existProb = 1.0;
if (object.exist_prob) {
if (object.exist_prob !== undefined) {
existProb = object.exist_prob;
}
return `ID: ${object.id} \n Prob.: ${existProb.toFixed(1)}`;
return `ID: ${object.id} \n Prob.: ${existProb.toFixed(2)}`;
};

createDefaultLabel = (text, color) => {
Expand Down

0 comments on commit d77a66a

Please sign in to comment.