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:
parent
e1d358ffbf
commit
c40d8d37dd
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue