# HG changeset patch # User Franck Deroche # Date 1293800853 -3600 # Node ID e02de6b2566ee992119b05fc459ee54dde764210 # Parent be7efc2a145e16074e43b9533fcdf4e8aa3d47ed Ensure that data.messages is set before checking its length diff -r be7efc2a145e -r e02de6b2566e popups.js --- a/popups.js Fri Dec 31 14:05:43 2010 +0100 +++ b/popups.js Fri Dec 31 14:07:33 2010 +0100 @@ -978,7 +978,7 @@ // Show messages in dialog and embed the results in the original page. // TODO - should seperate these two functions. // var showMessage = data.messages.length && !popup.options.noMessage; - if (data.messages.length) { + if (data.messages && data.messages.length) { // If we just dismissed the last popup dialog. if (!Popups.activePopup() && !popup.options.noMessage) { // Show drupal_set_message in message popup.