Preview for attachment does not work

Description

To Reproduce…

Steps to reproduce the behavior:

  1. Go to an email
  2. Right Click on an attachment and click preview
  3. See blank page
  4. Check dev tools
  5. See errors
Unable to load preload script: C:\Users\USER\AppData\Local\Mailspring\app-1.10.3\resources\app.asar\src\quickpreview\preload.js
(anonymous) @ node:electron/js2c/renderer_init:73

C:\Users\USER\AppData\Local\Mailspring\app-1.10.3\resources\app.asar\src\quickpreview\preload.js:64
        const win = const { BrowserWindow } = require('@electron/remote').getCurrentWindow();
                    ^^^^^

SyntaxError: Unexpected token 'const'
    at new Script (node:vm:100:7)
    at createScript (node:vm:257:10)
    at Object.runInThisContext (node:vm:305:10)
    at wrapSafe (node:internal/modules/cjs/loader:1027:15)
    at Module._compile (node:internal/modules/cjs/loader:1072:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:829:12)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
    at Function.o._load (node:electron/js2c/renderer_init:33:356)
(anonymous) @ node:electron/js2c/renderer_init:73
./lib/renderer/init.ts @ node:electron/js2c/renderer_init:73
__webpack_require__ @ node:electron/js2c/renderer_init:1
(anonymous) @ node:electron/js2c/renderer_init:1
___electron_webpack_init__ @ node:electron/js2c/renderer_init:1
(anonymous) @ node:electron/js2c/renderer_init:141
compileForInternalLoader @ node:internal/bootstrap/loaders:312
compileForPublicLoader @ node:internal/bootstrap/loaders:252
loadNativeModule @ node:internal/modules/cjs/helpers:49
Module._load @ node:internal/modules/cjs/loader:811
c._load @ node:electron/js2c/asar_bundle:5
executeUserEntryPoint @ node:internal/modules/run_main:81
(anonymous) @ node:internal/main/run_main_module:17

Expected Behavior

A preview of the attachment would show

Screenshots

Setup

  • OS and Version: Windows 10 and Windows 11
    • Installation Method: Installer
  • Mailspring Version: 1.10.3-a476c230

Additional Context

This bug is appearing in both incoming mails and while composing mails.