merge-requests/12/head
Matthew 2020-05-17 21:59:56 -04:00
parent 97709b9b87
commit 9e88445bbf
No known key found for this signature in database
GPG Key ID: D499B75C1390E321
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ export default class RichEmbed implements EmbedOptions {
*/ */
setURL(url: string) { setURL(url: string) {
if (typeof url !== 'string') throw new TypeError('RichEmbed URLs must be a string.'); if (typeof url !== 'string') throw new TypeError('RichEmbed URLs must be a string.');
if (!url.startsWith('http://') || !url.startsWith('https://')) url = `https://${url}`; if (!url.startsWith('http://') && !url.startsWith('https://')) url = `https://${url}`;
this.url = encodeURI(url); this.url = encodeURI(url);
return this; return this;
} }