Si la fenêtre indéfinie
if (typeof window !== 'undefined')
Faithful Fox
if (typeof window !== 'undefined')