From 9cdd47d256abe89d49be053386a0178d36b622fe Mon Sep 17 00:00:00 2001 From: undefined Date: Sat, 1 May 2021 12:17:25 +0800 Subject: [PATCH] judge: detail setting (#78) --- packages/hydrojudge/package.json | 2 +- packages/hydrojudge/src/hosts/hydro.ts | 2 +- packages/hydrojudge/src/hosts/vj4.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/hydrojudge/package.json b/packages/hydrojudge/package.json index c33c8e84c..0ae84b500 100644 --- a/packages/hydrojudge/package.json +++ b/packages/hydrojudge/package.json @@ -1,7 +1,7 @@ { "name": "@hydrooj/hydrojudge", "bin": "bin/hydrojudge.js", - "version": "2.5.16", + "version": "2.5.17", "main": "package.json", "author": "undefined ", "repository": "https://github.com/hydro-dev/Hydro.git", diff --git a/packages/hydrojudge/src/hosts/hydro.ts b/packages/hydrojudge/src/hosts/hydro.ts index 4b77dfcf4..f9e87de13 100644 --- a/packages/hydrojudge/src/hosts/hydro.ts +++ b/packages/hydrojudge/src/hosts/hydro.ts @@ -167,7 +167,7 @@ export default class Hydro { constructor(config) { this.config = config; - this.config.detail = this.config.detail || true; + this.config.detail = this.config.detail ?? true; this.config.cookie = this.config.cookie || ''; this.config.last_update_at = this.config.last_update_at || 0; if (!this.config.server_url.startsWith('http')) this.config.server_url = `http://${this.config.server_url}`; diff --git a/packages/hydrojudge/src/hosts/vj4.ts b/packages/hydrojudge/src/hosts/vj4.ts index 6d8333606..c770f1980 100644 --- a/packages/hydrojudge/src/hosts/vj4.ts +++ b/packages/hydrojudge/src/hosts/vj4.ts @@ -173,7 +173,7 @@ export default class VJ4 { constructor(config) { this.config = config; - this.config.detail = this.config.detail || true; + this.config.detail = this.config.detail ?? true; this.config.cookie = this.config.cookie || ''; this.config.last_update_at = this.config.last_update_at || 0; if (!this.config.server_url.startsWith('http')) this.config.server_url = `http://${this.config.server_url}`;