Skip to content

Commit

Permalink
Don't show lookUpSelection on links
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jun 30, 2019
1 parent 1b389b7 commit dcf9979
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Expand Up @@ -36,14 +36,15 @@ const create = (win, options) => {

const {editFlags} = props;
const hasText = props.selectionText.trim().length > 0;
const isLink = Boolean(props.linkURL);
const can = type => editFlags[`can${type}`] && hasText;

const defaultActions = {
separator: () => ({type: 'separator'}),
lookUpSelection: decorateMenuItem({
id: 'lookUpSelection',
label: 'Look Up “{selection}”',
visible: process.platform === 'darwin' && hasText,
visible: process.platform === 'darwin' && hasText && !isLink,
click() {
if (process.platform === 'darwin') {
webContents(win).showDefinitionForSelection();
Expand Down

0 comments on commit dcf9979

Please sign in to comment.