Fixes #7
parent
97709b9b87
commit
9e88445bbf
|
@ -75,7 +75,7 @@ export default class RichEmbed implements EmbedOptions {
|
|||
*/
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue