summaryrefslogtreecommitdiff
path: root/ext/mixed/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-07-03 11:57:15 -0400
committerGitHub <noreply@github.com>2020-07-03 11:57:15 -0400
commit897d85d1ac82dd2e757eefe99e4a6ac3e5e0c486 (patch)
tree00feb8a41f84bf20c3dd43127021e5d6d798ed2d /ext/mixed/js
parentc13160d784caf5ca2803081171d1c01eb91f49c6 (diff)
Util refactor and fix (#638)
* Remove unused functions * Fix clone function not being visible on the window object
Diffstat (limited to 'ext/mixed/js')
-rw-r--r--ext/mixed/js/core.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/mixed/js/core.js b/ext/mixed/js/core.js
index fec26a0e..7cdd62d8 100644
--- a/ext/mixed/js/core.js
+++ b/ext/mixed/js/core.js
@@ -192,6 +192,11 @@ const clone = (() => {
return clone;
})();
+// Expose clone function on the global object, since util.js's utilBackgroundIsolate needs access to it.
+if (typeof window === 'object' && window !== null) {
+ window.clone = clone;
+}
+
/*
* Async utilities