Skip to content

Commit

Permalink
- added storage API
Browse files Browse the repository at this point in the history
  • Loading branch information
temi committed Oct 16, 2023
1 parent db6e8fd commit 8347196
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion grails-app/assets/javascripts/entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,13 @@ var entities = (function () {
}
})();

function getDB() {
async function getDB() {
if (navigator.storage && navigator.storage.persisted) {
const persistent = await navigator.storage.persisted();
if (!persistent && navigator.storage.persist)
const result = await navigator.storage.persist();
}

var DB_NAME = "biocollect";
var db = new Dexie(DB_NAME);
db.version(4).stores({
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@turf/convex": "^6.0.2",
"@turf/length": "^6.0.2",
"@turf/simplify": "^5.1.5",
"chromedriver": "^115.0.0",
"chromedriver": "^117.0.3",
"geojson2svg": "^1.2.3",
"handlebars": "^4.7.7",
"jasmine-ajax": "^4.0.0",
Expand Down

0 comments on commit 8347196

Please sign in to comment.