Merge pull request #1509 from dudeami/fix/ssr-isFirstLoad

Fix server-side rendering after first load.
This commit is contained in:
SleeplessOne1917 2023-06-23 05:14:39 +00:00 committed by GitHub
commit 9040e2f157
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,3 +1,5 @@
import { isBrowser } from "@utils/browser";
export class FirstLoadService {
#isFirstLoad: boolean;
static #instance: FirstLoadService;
@ -20,6 +22,6 @@ export class FirstLoadService {
}
static get isFirstLoad() {
return this.#Instance.isFirstLoad;
return !isBrowser() || this.#Instance.isFirstLoad;
}
}