Skip to content

Commit

Permalink
Merge pull request #702 from ubc/fix-rich-content-refresh
Browse files Browse the repository at this point in the history
Fix rich content attachment refresh
  • Loading branch information
andrew-gardener authored Feb 6, 2018
2 parents c08bdc6 + deaa240 commit 367b3b5
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ module.directive('richContent',

// needs to be compiled by dynamic
$scope.richContent = '<div mathjax hljs >'+content+'</div>';
};

var processAttachment = function() {
$scope.attachmentContent = [];
if ($scope.attachment) {
$scope.attachmentContent.push(
Expand All @@ -328,7 +330,9 @@ module.directive('richContent',
};

$scope.$watchCollection('content', processContent);
processContent()
$scope.$watchCollection('attachment', processAttachment);
processContent();
processAttachment();
}
};
}
Expand Down

0 comments on commit 367b3b5

Please sign in to comment.