Skip to content
Snippets Groups Projects
Commit c48c9411 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2047671 by jessebeach, Wim Leers, nod, xjm: Expanded contextual links...

Issue #2047671 by jessebeach, Wim Leers, nod, xjm: Expanded contextual links look goofy when there are no items.
parent b413088e
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -137,7 +137,10 @@ Drupal.behaviors.contextual = {
dataType: 'json',
success: function (results) {
for (var id in results) {
if (results.hasOwnProperty(id)) {
// If the rendered contextual links are empty, then the current user
// does not have permission to access the associated links: don't
// render anything.
if (results.hasOwnProperty(id) && results[id].length > 0) {
// Update the placeholders to contain its rendered contextual links.
// Usually there will only be one placeholder, but it's possible for
// multiple identical placeholders exist on the page (probably
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment