diff --git a/package.json b/package.json index bd81a06a6..712c8ae9e 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "semver": "^7.6.0", "simple-git": "^3.23.0", "supertest": "^6.3.4", - "typescript": "^5.3.3", + "typescript": "^5.4.3", "wtfnode": "^0.9.1" } } diff --git a/packages/ui-default/backendlib/template.ts b/packages/ui-default/backendlib/template.ts index 87330a9f0..768ec2b40 100644 --- a/packages/ui-default/backendlib/template.ts +++ b/packages/ui-default/backendlib/template.ts @@ -13,8 +13,8 @@ import * as misc from './misc'; const argv = require('cac')().parse(); let { template } = argv.options; -if (template && typeof template !== 'string') template = findFileSync('@hydrooj/ui-default/templates'); -else template &&= findFileSync(template); +if (!template || typeof template !== 'string') template = findFileSync('@hydrooj/ui-default/templates'); +else template = findFileSync(template); class Loader extends nunjucks.Loader { getSource(name) {