diff --git a/password_policy.js b/password_policy.js
index 8b17a47..a20fc78 100644
--- a/password_policy.js
+++ b/password_policy.js
@@ -51,6 +51,10 @@ Drupal.evaluatePasswordStrength = function (password, translate) {
  */
 Drupal.behaviors.passwordPolicyConstraintSettingsSummary = {
   attach: function (context) {
+    // in some situations this file might be included without a password policy being active
+    // for the current users role. In which case, we should bail out.
+    if (jQuery('password-suggestions description').length == 0) { return; };
+
     $('fieldset#edit-alpha-count-fieldset', context).drupalSetSummary(function (context) {
       alpha_count = $('input[name="alpha_count"]', context).val();
       if (!alpha_count) {
@@ -128,6 +132,10 @@ Drupal.behaviors.passwordPolicyConstraintSettingsSummary = {
  */
 Drupal.behaviors.passwordPolicyConditionSettingsSummary = {
   attach: function (context) {
+    // in some situations this file might be included without a password policy being active
+    // for the current users role. In which case, we should bail out.
+    if (jQuery('password-suggestions description').length == 0) { return; };
+
     $('fieldset#edit-role-fieldset', context).drupalSetSummary(function (context) {
       var vals = [];
       $('input[type="checkbox"]:checked', context).each(function() {
