From 8b40b45d014caad440284dce70841ecc79298652 Mon Sep 17 00:00:00 2001 From: Greg Bowyer Date: Sun, 9 Sep 2012 00:02:56 +0000 Subject: [PATCH] SOLR-3784: Prevent Javascript UI hangs due to similarity git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1382385 13f79535-47bb-0310-9956-ffa450edef68 --- solr/webapp/web/js/scripts/schema-browser.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/solr/webapp/web/js/scripts/schema-browser.js b/solr/webapp/web/js/scripts/schema-browser.js index e222fd15301..f265d979ad4 100644 --- a/solr/webapp/web/js/scripts/schema-browser.js +++ b/solr/webapp/web/js/scripts/schema-browser.js @@ -887,10 +887,12 @@ sammy.get var similarity_element = $( 'dt.similarity', options_element ); if ( is_t && schema_browser_data.types[field] && schema_browser_data.types[field].similarity ) { var similarity = schema_browser_data.types[field].similarity - $( 'dd.similarity', options_element ).remove(); - similarity_element - .show() - .after(['
', similarity.details.esc(), ' (', similarity.className.esc(), ')
'].join("")); + if (similarity.details && similarity.className) { + $( 'dd.similarity', options_element ).remove(); + similarity_element + .show() + .after(['
', similarity.details.esc(), ' (', similarity.className.esc(), ')
'].join("")); + } } else { $( '.similarity', options_element ).hide(); }