Skip to content

Commit

Permalink
fix(linux): no primary display
Browse files Browse the repository at this point in the history
  • Loading branch information
bencevans committed Nov 10, 2020
1 parent eabafa4 commit a337ad3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/linux/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function guessFiletype (filename) {
function linuxSnapshot (options = {}) {
return new Promise((resolve, reject) => {
listDisplays().then((screens) => {
const screen = screens.find(options.screen ? screen => screen.id === options.screen : screen => screen.primary || screen.id === 'default')
const screen = screens.find(options.screen ? screen => screen.id === options.screen : screen => screen.primary || screen.id === 'default') || screens[0]

const filename = options.filename ? (options.filename.replace(/"/g, '\\"')) : '-'
const execOptions = options.filename ? {} : {
Expand Down

0 comments on commit a337ad3

Please sign in to comment.