Skip to content

Commit fb2748d

Browse files
committed
Clean up
1 parent 354a730 commit fb2748d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

renderer-process/printing/desktop-capturer.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ const screenshot = document.getElementById('screen-shot')
1111

1212
screenshot.addEventListener('click', function (event) {
1313
const thumbSize = determineScreenShotSize()
14-
desktopCapturer.getSources({types: ['screen'], thumbnailSize: thumbSize}, function (error, sources) {
14+
let options = { types: ['screen'], thumbnailSize: thumbSize }
15+
16+
desktopCapturer.getSources(options, function (error, sources) {
1517
if (error) return console.log(error)
1618

1719
sources.forEach(function (source) {
18-
if (source.name === "Entire screen") {
20+
if (source.name === 'Entire screen') {
1921
var screenshotPath = path.join(os.tmpdir(), 'screenshot.png')
2022

2123
fs.writeFile(screenshotPath, source.thumbnail.toPng(), function (error) {

0 commit comments

Comments
 (0)