From be20752cfff693b58e5f6fdac24b73c502db8a89 Mon Sep 17 00:00:00 2001 From: Azmoria <65363489+Azmoria@users.noreply.github.com> Date: Sat, 21 Oct 2023 14:44:08 -0400 Subject: [PATCH] Internal - context menu fix. --- TokenMenu.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/TokenMenu.js b/TokenMenu.js index 2f1c9c932..7457f783f 100644 --- a/TokenMenu.js +++ b/TokenMenu.js @@ -99,7 +99,9 @@ function token_context_menu_expanded(tokenIds, e) { console.warn(`token_context_menu_expanded was called with ids: ${JSON.stringify(tokenIds)}, but no matching tokens could be found`); return; } - + if(door?.length > 0 && !window.DM){ + return; + } @@ -125,10 +127,10 @@ function token_context_menu_expanded(tokenIds, e) { $('body').append(tokenOptionsClickCloseDiv); - if(tokens.length === 0 && door != undefined){ + if(door?.length == 1){ if(window.DM) { - let notesRow = $(``); + let notesRow = $(``); notesRow.hover(function (hoverEvent) { context_menu_flyout("notes-flyout", hoverEvent, function(flyout) { flyout.append(build_notes_flyout_menu(tokenIds));