windowExists function fix

This commit is contained in:
Matteo Manzinello
2019-10-27 12:43:45 +01:00
parent 68920313c6
commit e43f387097
4 changed files with 12 additions and 7 deletions

View File

@@ -1,6 +1,8 @@
// @flow
const V = "MAILGO_VERSION";
// window exists
const windowExists = () => window && typeof window !== "undefined";
// links
const MAILTO = "mailto:";
const TEL = "tel:";
@@ -813,9 +815,6 @@ const encodeEmail = email => btoa(email);
// getE shorthand
const getE = id => document.getElementById(id);
// window exists
const windowExists = () => window && typeof window !== "undefined";
// get display value
const getDisplay = id => getE(id).style.display;