From 9e88445bbf1d6c77a6163e7c272eb3c087f85960 Mon Sep 17 00:00:00 2001 From: Matthew Ray Date: Sun, 17 May 2020 21:59:56 -0400 Subject: [PATCH] Fixes #7 --- src/class/RichEmbed.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class/RichEmbed.ts b/src/class/RichEmbed.ts index 7df2ec0..38cf297 100644 --- a/src/class/RichEmbed.ts +++ b/src/class/RichEmbed.ts @@ -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; }