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

2
dist/mailgo.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -34,7 +34,13 @@ function js() {
.pipe(replace("MAILGO_VERSION", version))
.pipe(replace("MAILGO_STYLE", cssMinContent))
.pipe(babel())
.pipe(uglify())
.pipe(
uglify({
mangle: {
keep_fnames: true // keep function names
}
})
)
.pipe(
rename({
suffix: ".min"

File diff suppressed because one or more lines are too long

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;