Skip to content

Commit fe78d5a

Browse files
committed
Merge branch 'hotfix/featured-doc-intro-markdown'
2 parents cad42c9 + 60cb952 commit fe78d5a

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

public/build/app.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/app.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
<script src="/build/annotator.js?949a18f6"></script>
4141

42-
<script src="/build/app.js?50d0d042"></script>
42+
<script src="/build/app.js?08c1f0ef"></script>
4343
</head>
4444
<body>
4545

public/js/controllers/homePageController.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,13 @@ angular.module('madisonApp.controllers')
2626
});
2727

2828
Doc.getFeaturedDoc(function (data) {
29-
var converter = new Markdown.Converter();
30-
3129
$scope.featured = data;
32-
$scope.featured.introtext = $sce.trustAsHtml(converter.makeHtml(data.introtext));
30+
31+
//Parse introtext if it exists
32+
if(!!data.introtext) {
33+
var converter = new Markdown.Converter();
34+
$scope.featured.introtext = $sce.trustAsHtml(converter.makeHtml(data.introtext));
35+
}
3336
}).$promise.catch(function (data) {
3437
console.error("Unable to get featured document: %o", data);
3538
});

0 commit comments

Comments
 (0)