From 7febc979869a301b394ecdc62cc1c9fcac909d3b Mon Sep 17 00:00:00 2001 From: RangerMauve Date: Fri, 9 Oct 2020 07:35:11 -0400 Subject: [PATCH] Detect window.close is defined (#49) --- test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.js b/test.js index b6c0192..1d93cdb 100644 --- a/test.js +++ b/test.js @@ -1,3 +1,3 @@ require('sodium-test')(require('.')) -if (typeof window !== 'undefined') window.close() +if ((typeof window !== 'undefined') && window.close) window.close()