merge-requests/13/head
Matthew 2020-05-17 21:59:21 -04:00
parent 817328a49d
commit ef31fc3abc
No known key found for this signature in database
GPG Key ID: D499B75C1390E321
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ export default class RichEmbed implements EmbedData {
*/
setURL(url: 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);
return this;
}