Put an error in the console if the discourseEmbedUrl is relative

This commit is contained in:
Robin Ward 2017-02-13 11:18:24 -05:00
parent e1d358ffbf
commit c40d8d37dd
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,10 @@
var queryParams = {};
if (DE.discourseEmbedUrl) {
if (DE.discourseEmbedUrl.indexOf('/') === 0) {
console.error("discourseEmbedUrl must be a full URL, not a relative path");
}
queryParams.embed_url = encodeURIComponent(DE.discourseEmbedUrl);
}