2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-04 08:47:37 +08:00

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

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);
}