mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-23 10:07:02 +00:00
Fix broken check for document existence
This commit is contained in:
1 parent
f1bebe3895
commit
3f8ec30f89
1 file changed
+1
-1
@@ -5,7 +5,7 @@ let div = null;
|
||||
|
||||
function safeHTML(htmlString) {
|
||||
// If the Document interface doesn't exist, exit
|
||||
if(!document) return null;
|
||||
if(typeof document == 'undefined') return null;
|
||||
// If the test document and div don't exist, create them
|
||||
if(!doc) doc = document.implementation.createHTMLDocument('');
|
||||
if(!div) div = doc.createElement('div');
|
||||
|
||||
Reference in new issue
Block a user