From 76c8886e6477ef6c73e76d99bed3c9617bce9122 Mon Sep 17 00:00:00 2001 From: Dominic <46988366+domjoseph-flg@users.noreply.github.com> Date: Mon, 31 Aug 2020 16:00:24 +1000 Subject: [PATCH] Update postscribe.js --- src/postscribe.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/postscribe.js b/src/postscribe.js index feb9717a..8e740f6d 100644 --- a/src/postscribe.js +++ b/src/postscribe.js @@ -161,7 +161,7 @@ export default function postscribe(el, html, options) { // id selector if ((/^#/).test(el)) { - el = window.document.getElementById(el.substr(1)); + el = window !== 'undefined' ? window.document.getElementById(el.substr(1)) : el.jquery ? el[0] : el; } else { el = el.jquery ? el[0] : el; }