From 479cbec1424cd59a3cb86d0f76666ad23031bc5b Mon Sep 17 00:00:00 2001 From: elam-scottlogic <118171831+elam-scottlogic@users.noreply.github.com> Date: Mon, 29 May 2023 11:34:59 +0100 Subject: [PATCH] error handling (#49) * error handling * create new version for release --- image-hover.js | 2 +- module.json | 44 +++++++++++++++++++++----------------------- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/image-hover.js b/image-hover.js index 1ca306c..5dd925e 100644 --- a/image-hover.js +++ b/image-hover.js @@ -464,7 +464,7 @@ Hooks.on("createToken", (token, options, userId) => { * @param {Boolean} hovered if token is mouseovered */ Hooks.on("hoverToken", (token, hovered) => { - if (showSpecificArt) return; + if (showSpecificArt || canvas.hud.imageHover === undefined) return; if (!hovered) { canvas.hud.imageHover.clear(); return; diff --git a/module.json b/module.json index daa0fc8..72ea4f9 100644 --- a/module.json +++ b/module.json @@ -1,28 +1,26 @@ { - "name": "image-hover", - "title": "Image Hover", - "description": "This module allows users to see the character art while hovering over a token.", - "author": "Eriku", - "authors": [ - { + "name": "image-hover", + "title": "Image Hover", + "description": "This module allows users to see the character art while hovering over a token.", + "author": "Eriku", + "authors": [ + { "name": "Eriku", "discord": "Eriku#2108", "url": "https://github.com/Eriku33" - } - ], - "version": "3.0.1", - "compatibility": { - "minimum": "10", - "verified": "10.291" - }, - "socket": true, - "esmodules": [ - "image-hover.js" - ], - "url": "https://github.com/Eriku33/Foundry-VTT-Image-Hover", - "manifest": "https://github.com/Eriku33/Foundry-VTT-Image-Hover/releases/download/3.0.1/module.json", - "download": "https://github.com/Eriku33/Foundry-VTT-Image-Hover/releases/download/3.0.1/module.zip", - "readme": "https://github.com/Eriku33/Foundry-VTT-Image-Hover/blob/main/README.md", - "bugs": "https://github.com/Eriku33/Foundry-VTT-Image-Hover/issues", - "changelog": "https://github.com/Eriku33/Foundry-VTT-Image-Hover/blob/main/CHANGELOG.md" + } + ], + "version": "3.0.2", + "compatibility": { + "minimum": "10", + "verified": "10.291" + }, + "socket": true, + "esmodules": ["image-hover.js"], + "url": "https://github.com/Eriku33/Foundry-VTT-Image-Hover", + "manifest": "https://github.com/Eriku33/Foundry-VTT-Image-Hover/releases/download/3.0.2/module.json", + "download": "https://github.com/Eriku33/Foundry-VTT-Image-Hover/releases/download/3.0.2/module.zip", + "readme": "https://github.com/Eriku33/Foundry-VTT-Image-Hover/blob/main/README.md", + "bugs": "https://github.com/Eriku33/Foundry-VTT-Image-Hover/issues", + "changelog": "https://github.com/Eriku33/Foundry-VTT-Image-Hover/blob/main/CHANGELOG.md" }