aboutsummaryrefslogtreecommitdiff
path: root/assets/js
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2023-12-01 19:28:38 -0500
committertdro <tdro@noreply.example.com>2023-12-01 19:28:38 -0500
commit71f7ec33a8086724bc520f168c233b00d9f367f5 (patch)
treedbe372fb622d016fae7d475842060722e3067ddb /assets/js
parent0cc8a72e45fe2891c9e11de8566fce91c16d62d3 (diff)
downloadcanory-71f7ec33a8086724bc520f168c233b00d9f367f5.tar.gz
canory-71f7ec33a8086724bc520f168c233b00d9f367f5.tar.bz2
canory-71f7ec33a8086724bc520f168c233b00d9f367f5.zip
static/js/hoverfix: Check function existence
Diffstat (limited to 'assets/js')
-rw-r--r--assets/js/index.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/assets/js/index.js b/assets/js/index.js
index b4e0120..a766e4a 100644
--- a/assets/js/index.js
+++ b/assets/js/index.js
@@ -623,6 +623,7 @@
}
}
self.addEventListener("mousemove", function(event) {
+ if (typeof event.target.closest !== "function") return;
tree = event.target.closest("figure") || event.target.closest("article");
if (tree !== null) {
walk(tree.children, function(element) {