Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit ba679d3

Browse files
committed
fix(packages/core): another undefined use of Electron
Fixes #4187
1 parent b0319ae commit ba679d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/main/spawn-electron.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ export function createWindow(
309309
debug('ipc registration')
310310
ipcMain.on('capture-page-to-clipboard', async (event: IpcMainEvent, contentsId: string, rect: Rectangle) => {
311311
try {
312-
const { clipboard, nativeImage, webContents } = Electron
312+
const { clipboard, nativeImage, webContents } = await import('electron')
313313
const image = await webContents.fromId(parseInt(contentsId, 10)).capturePage(rect)
314314
try {
315315
const buf = image.toPNG()

0 commit comments

Comments
 (0)