DEV: Extensively use startsWith() (#17540)

This commit is contained in:
Jarek Radosz
2022-07-17 20:16:39 +02:00
committed by GitHub
parent 6a4a7b1d88
commit 5f7163b5bb
16 changed files with 34 additions and 35 deletions

View File

@@ -17,7 +17,7 @@
var queryParams = {};
if (DE.discourseEmbedUrl) {
if (DE.discourseEmbedUrl.indexOf("/") === 0) {
if (DE.discourseEmbedUrl.startsWith("/")) {
console.error(
"discourseEmbedUrl must be a full URL, not a relative path"
);