diff --git a/module.json b/module.json index 6921fad..6d399ee 100644 --- a/module.json +++ b/module.json @@ -6,7 +6,7 @@ "authors": [ { "name": "Robin Riis" } ], - "version": "0.1.31", + "version": "0.1.32", "socket": true, "minimumCoreVersion": 10, "compatibility": { diff --git a/scripts/puckoapi/puckoapi.js b/scripts/puckoapi/puckoapi.js index 0bb45f1..773ed6f 100644 --- a/scripts/puckoapi/puckoapi.js +++ b/scripts/puckoapi/puckoapi.js @@ -7,9 +7,9 @@ export class PuckoPruttApi { } async _fetch_json(url) { - const response = await foundry.utils.fetchJsonWithTimeout(this.apiUrl + url); - const dagens = await response.json(); - return dagens; + await foundry.utils.fetchJsonWithTimeout(this.apiUrl + url).then(dagens => { + return dagens; + }); } dagens_lunch(spider) {