Lint fixes

This commit is contained in:
Scott Nonnenberg
2019-04-10 12:14:32 -07:00
parent 851c1a0e47
commit 5a50786e7a
2 changed files with 22 additions and 7 deletions

View File

@@ -288,13 +288,12 @@ const contextMenu = require('electron-context-menu');
contextMenu({
showInspectElement: false,
shouldShowMenu: (event, params) => {
if(!params.isEditable && params.mediaType === 'none' && ( params.linkURL.length !== 0 || params.selectionText.length !== 0 )) {
return params.linkURL || params.selectionText;
}
return false;
},
shouldShowMenu: (event, params) =>
Boolean(
!params.isEditable &&
params.mediaType === 'none' &&
(params.linkURL || params.selectionText)
),
});
// We pull this in last, because the native module involved appears to be sensitive to