From 4f0d8be66158bdcde1f086c7a1b3267503fa97c5 Mon Sep 17 00:00:00 2001 From: undefined Date: Tue, 21 Jul 2020 07:51:15 +0800 Subject: [PATCH] fix detect-browser load --- hydro/handler/record.ts | 2 +- hydro/lib/useragent.ts | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hydro/handler/record.ts b/hydro/handler/record.ts index 766d40a4..19cc5fe4 100644 --- a/hydro/handler/record.ts +++ b/hydro/handler/record.ts @@ -158,7 +158,7 @@ class RecordDetailConnectionHandler extends contest.ContestHandlerMixin(Connecti } this.rid = rid.toString(); bus.subscribe(['record_change'], this, 'onRecordChange'); - this.onRecordChange({ value: rdoc }); + this.onRecordChange({ value: { rdoc } }); } async onRecordChange(data) { diff --git a/hydro/lib/useragent.ts b/hydro/lib/useragent.ts index 3beb1e43..0ba335b7 100644 --- a/hydro/lib/useragent.ts +++ b/hydro/lib/useragent.ts @@ -1,4 +1,4 @@ -import browser from 'detect-browser'; +import * as browser from 'detect-browser'; export function parse(str: string) { return browser.parseUserAgent(str); diff --git a/package.json b/package.json index 93fbd54d..7b172d8e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hydrooj", - "version": "2.9.5", + "version": "2.9.6", "main": "dist/loader.js", "bin": "bin/hydrooj.js", "repository": "https://github.com/hydro-dev/Hydro.git",