Fix 'undefined' error with the context menu

pull/1/head
yflory 8 years ago
parent c34c1cb07c
commit b818fd8a37

@ -717,7 +717,7 @@ define([
if (e) { module.hideMenu(); } if (e) { module.hideMenu(); }
// Remove the selection if we don't hold ctrl key or if we are right-clicking // Remove the selection if we don't hold ctrl key or if we are right-clicking
if (!e || !e.ctrlKey) { if (!e || !e.ctrlKey) {
removeSelected(e.shiftKey); removeSelected(e && e.shiftKey);
} }
if (!$element.length) { if (!$element.length) {
log(Messages.fm_selectError); log(Messages.fm_selectError);
@ -737,7 +737,7 @@ define([
}); });
delete sel.endSelected; delete sel.endSelected;
} }
if (e.shiftKey) { if (e && e.shiftKey) {
var end = $elements.index($element[0]); var end = $elements.index($element[0]);
sel.endSelected = end; sel.endSelected = end;
var $el; var $el;

Loading…
Cancel
Save