Skip to content

Commit

Permalink
fixed location of IUCN cache for packaged app
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattk70 committed Oct 31, 2024
1 parent efc929e commit 8c0db30
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion IUCNcache.json

This file was deleted.

3 changes: 3 additions & 0 deletions js/IUCNcache.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions js/ui.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {trackVisit, trackEvent} from './tracking.js';
import {DOM} from './DOMcache.js';
import {IUCNCache} from './IUCNcache.js';

let LOCATIONS, locationID = undefined, loadingTimeout;

Expand Down Expand Up @@ -72,7 +73,7 @@ let STATE = {
birdList: { lastSelectedSpecies: undefined }, // Used to put the last selected species at the top of the all-species list
selection: { start: undefined, end: undefined },
currentAnalysis: {currentFile: null, openFiles: [], mode: null, species: null, offset: 0, active: null},
IUCNcache: {}
IUCNcache:IUCNCache
}

// Batch size map for slider
Expand Down Expand Up @@ -3160,7 +3161,7 @@ function centreSpec(){
</td>`;

if (showIUCN) {
const record = await getIUCNStatus(item.sname);
const record = STATE.IUCNcache[item.sname];
// there might not be a record...
const iucn = record?.scopes.find(obj => obj.scope === config.detect.iucnScope);
const status = iucn?.status || 'NA';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chirpity",
"version": "2.2.1",
"version": "2.2.3",
"description": "Chirpity Nocmig",
"main": "main.js",
"scripts": {
Expand Down

0 comments on commit 8c0db30

Please sign in to comment.