fix(menu) isPath: menu does not open when the root is empty (#108)

This commit is contained in:
coderaiser 2017-02-24 10:21:13 +02:00
parent 73a5d22041
commit 79c171655b

View file

@ -192,7 +192,11 @@ function MenuProto(position) {
}
function isPath(x, y) {
const panel = Info.panel;
const {panel} = Info;
const isEmptyRoot = !panel;
if (isEmptyRoot)
return false;
const el = document.elementFromPoint(x, y);
const elements = panel.querySelectorAll('[data-name="js-path"] *');