Skip to content

Commit fcf792e

Browse files
committed
Fix imports
1 parent 388a7e2 commit fcf792e

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

main/windows/player.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,19 @@ const player = module.exports = {
1414

1515
let alwaysOnTop = false
1616

17-
require('electron-debug')({ showDevTools: 'undocked' })
18-
require('electron-context-menu')()
17+
import('electron-debug').then(({ default: debug }) => {
18+
debug({ showDevTools: 'undocked' })
19+
}).catch(err => {
20+
console.error('Failed to load electron-debug:', err)
21+
})
22+
23+
import('electron-context-menu').then(({ default: contextMenu }) => {
24+
contextMenu({
25+
showSaveImageAs: true
26+
})
27+
}).catch(err => {
28+
console.error('Failed to load electron-context-menu:', err)
29+
})
1930

2031
function init () {
2132
player.windowState = windowStateKeeper({ width: 800, height: 600 })

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"classnames": "^2.2.6",
8080
"content-addressable-blob-store": "^5.0.1",
8181
"csjs-inject": "^1.0.1",
82-
"electron-context-menu": "^3.6.1",
82+
"electron-context-menu": "^4.0.0",
8383
"electron-debug": "^4.0.0",
8484
"electron-default-menu": "^1.0.1",
8585
"electron-log": "^5.0.0-beta.16",

0 commit comments

Comments
 (0)