Comment Embed Duplicating


I am having a strange issue with the Discourse embed. Right now the embed section is showing up twice and is rendering duplicate iframes. Here is the code:

<div id="discourse-comments"></div>
<script type="text/javascript">
	DiscourseEmbed = { discourseUrl: '',
	topicId: 23 };
	(function() {
		var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
		d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
		(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);

Any insight as to why this may be happening would be awesome. Thanks.


Still having issues with this. I’ve resorted to just embedding the iframe code and using some JS to fix the height. I would like to use the Discourse JS but still have this issue.