diff --git a/index.html b/index.html
index cdf477d..f25a0b1 100644
--- a/index.html
+++ b/index.html
@@ -119,7 +119,16 @@
/**
* (De)selects signatures based on the selection stored in a cookie.
*/
- const loadSelectedSignaturesFromCookie = () => setSelectedSignatures(Cookies.get("selectedSignatures").split(","));
+ const loadSelectedSignaturesFromCookie = () => {
+ const cookie = Cookies.get("selectedSignatures");
+ let signatures;
+ if (cookie === undefined)
+ signatures = [];
+ else
+ signatures = cookie.split(",");
+
+ setSelectedSignatures(signatures);
+ };
/**
* Saves the currently-selected signatures to a cookie.