Skip to content

Commit

Permalink
fix: false config not work
Browse files Browse the repository at this point in the history
  • Loading branch information
OXeu committed Jul 10, 2024
1 parent 63902cd commit fa1e205
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/src/page/feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ export function FeedPage({ id, TOC, clean }: { id: string, TOC: () => JSX.Elemen
)}
</div>
{counterEnabled && <p className='text-[12px] text-gray-400 font-normal link-line'>
<span className="font-bold"> {t("count.pv")} </span>
<span> {t("count.pv")} </span>
<span>
{feed.pv}
</span>
<span> |</span>
<span className="font-bold"> {t("count.uv")} </span>
<span> {t("count.uv")} </span>
<span>
{feed.uv}
</span>
Expand Down
4 changes: 2 additions & 2 deletions client/src/state/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const defaultClientConfig = new Map(Object.entries({
export const defaultServerConfig = new Map(Object.entries({
"friend_apply_auto_accept": false,
"friend_crontab": true,
"friend_ua":"Rin-Check/0.1.0"
"friend_ua": "Rin-Check/0.1.0"
}))

export class ConfigWrapper {
Expand All @@ -22,7 +22,7 @@ export class ConfigWrapper {
}
get<T>(key: string) {
const value = this.config[key];
if (value != undefined && value != "") {
if (value != undefined && value !== "") {
return value as T;
}
if (this.defaultConfig.has(key)) {
Expand Down

0 comments on commit fa1e205

Please sign in to comment.