mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 14:01:14 +08:00
Put an error in the console if the discourseEmbedUrl is relative
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user