소스 검색

Add defensive check for empty repository key

Brian Clozel 8 년 전
부모
커밋
b2be58e5da
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      js/projectDocumentationWidget.js

+ 1 - 1
js/projectDocumentationWidget.js

@@ -95,7 +95,7 @@ Spring.SnippetView = Backbone.View.extend({
     this.combinedTemplate = _.template(
     	"<div class=\"highlight\"><pre><code>" +
         downloadTemplate.find("code:first").html() +
-        "{@ if (repository) { @}" +
+        "{@ if (typeof(repository) != \"undefined\") { @}" +
         repositoryTemplate.find("code:first").html() +
         "{@ } @}" +
         "</code></pre></div>"