why does this check exist

This commit is contained in:
Emily 2020-10-28 12:17:23 +11:00
parent a8e9ed2dca
commit 026cc7ddb1

View file

@ -101,7 +101,6 @@ class RichEmbed {
*/
setImage (imageURL) {
if (typeof imageURL !== 'string') throw new TypeError(`Expected type 'string', received type ${typeof imageURL}`);
if (!imageURL.startsWith('attachment://') && !URL_REGEX.test(imageURL)) throw new Error('Not a well formed URL');
this.image = { url: imageURL };
return this;
}