summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/block/block.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/block/block.js b/modules/block/block.js
index 23bd50da3..95881cbb8 100644
--- a/modules/block/block.js
+++ b/modules/block/block.js
@@ -6,6 +6,13 @@
*/
Drupal.behaviors.blockSettingsSummary = {
attach: function (context) {
+ // The setSummary method required for this behavior is not available
+ // on the Blocks administration page, so we need to make sure this
+ // behavior is processed only if setSummary is defined.
+ if (typeof jQuery.fn.setSummary == 'undefined') {
+ return;
+ }
+
$('fieldset#edit-path', context).setSummary(function (context) {
if (!$('textarea[name="pages"]', context).val()) {
return Drupal.t('Not restricted');