Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

fix(js): move require to top of file

Gabe Kangasf981c913b587
diff --git a/web/utils/apis.ts b/web/utils/apis.ts
index ca7248e89c..23542c60ce 100644
--- a/web/utils/apis.ts
+++ b/web/utils/apis.ts
@@ -1,3 +1,5 @@
+const semverGt = require('semver/functions/gt');
+
/* eslint-disable prefer-destructuring */
const ADMIN_USERNAME = process.env.NEXT_PUBLIC_ADMIN_USERNAME;
const ADMIN_STREAMKEY = process.env.NEXT_PUBLIC_ADMIN_STREAMKEY;
@@ -181,7 +183,6 @@ export async function getGithubRelease() {
}
function upToDate(local, remote) {
- const semverGt = require('semver/functions/gt');
return !semverGt(remote, local);
}