mirror of
https://github.com/zadam/trilium.git
synced 2026-06-18 13:11:14 +02:00
fix(server): random error due to font loading while not initialized
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import type { Request, Response } from "express";
|
||||
import optionService from "../../services/options.js";
|
||||
import type { OptionMap } from "@triliumnext/commons";
|
||||
import { sql_init } from "@triliumnext/core";
|
||||
import type { Request, Response } from "express";
|
||||
|
||||
import optionService from "../../services/options.js";
|
||||
|
||||
const SYSTEM_SANS_SERIF = [
|
||||
"system-ui",
|
||||
@@ -22,7 +24,7 @@ const SYSTEM_MONOSPACE = ["ui-monospace", "SFMono-Regular", "SF Mono", "Consolas
|
||||
function getFontCss(req: Request, res: Response) {
|
||||
res.setHeader("Content-Type", "text/css");
|
||||
|
||||
if (!optionService.getOptionBool("overrideThemeFonts")) {
|
||||
if (!sql_init.isDbInitialized() || !optionService.getOptionBool("overrideThemeFonts")) {
|
||||
res.send("");
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user