fix: Jan server is showing blank page (#1702)

This commit is contained in:
Louis 2024-01-22 16:05:36 +07:00 committed by GitHub
parent 4cf47777e6
commit b4f104f411
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@
"@fastify/cors": "^8.4.2",
"@fastify/static": "^6.12.0",
"@fastify/swagger": "^8.13.0",
"@fastify/swagger-ui": "^2.0.1",
"@fastify/swagger-ui": "2.0.1",
"@janhq/core": "link:./core",
"dotenv": "^16.3.1",
"fastify": "^4.24.3",

View File

@ -11,7 +11,7 @@ const Logs = () => {
useEffect(() => {
getServerLog().then((log) => {
setLogs(log.split(/\r?\n|\r|\n/g))
if (typeof log?.split === 'function') setLogs(log.split(/\r?\n|\r|\n/g))
})
// eslint-disable-next-line react-hooks/exhaustive-deps