From 0a4bac56ea0cd5f38493c4917f397a403cf02f26 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Sun, 1 Dec 2013 19:34:58 +0000 Subject: [PATCH] missed from previous commit a77a31ac0766cf353d078f4addc0701042cc3f60 --- code/portal_detail_display.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/portal_detail_display.js b/code/portal_detail_display.js index d240ebd9..231e9716 100644 --- a/code/portal_detail_display.js +++ b/code/portal_detail_display.js @@ -142,8 +142,11 @@ window.renderPortalDetails = function(guid) { '
' + linkDetails.join('') + '
' ); - - runHooks('portalDetailsUpdated', {guid: guid, portal: portal, portalDetails: details, portalData: data}); + // only run the hooks when we have a portalDetails object - most plugins rely on the extended data + // TODO? another hook to call always, for any plugins that can work with less data? + if (details) { + runHooks('portalDetailsUpdated', {guid: guid, portal: portal, portalDetails: details, portalData: data}); + } }