فهرست منبع

Bugfix. URL is passed in, not object

JC Brand 3 سال پیش
والد
کامیت
1104b28758
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/shared/chat/templates/unfurl.js

+ 2 - 2
src/shared/chat/templates/unfurl.js

@@ -12,8 +12,8 @@ function isValidImage (image) {
     return image && isDomainAllowed(image, 'allowed_image_domains') && isValidURL(image);
 }
 
-function shouldHideMediaURL (o) {
-    return isGIFURL(o.url) || isVideoURL(o.url) || isAudioURL(o.url);
+function shouldHideMediaURL (url) {
+    return url && (isGIFURL(url) || isVideoURL(url) || isAudioURL(url));
 }
 
 const tpl_url_wrapper = (o, wrapped_template) =>