🐛 Under certain circumstances, main.js throws an error upon startup https://github.com/siyuan-note/siyuan/issues/17048

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-02-14 17:28:57 +08:00
parent c6538f8732
commit 5eff630e4f
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -349,8 +349,7 @@ const initMainWindow = () => {
writeLog("window stat [x=" + windowState.x + ", y=" + windowState.y + ", width=" + windowState.width + ", height=" + windowState.height + "], " +
"default [x=0, y=0, width=" + defaultWidth + ", height=" + defaultHeight + "], " +
"old [x=" + oldWindowState.x + ", y=" + oldWindowState.y + ", width=" + oldWindowState.width + ", height=" + oldWindowState.height + "], " +
"workArea [width=" + workArea.width + ", height=" + workArea.height + "]");
"old [x=" + oldWindowState.x + ", y=" + oldWindowState.y + ", width=" + oldWindowState.width + ", height=" + oldWindowState.height + "]");
let resetToCenter = false;
let x = windowState.x;