@giphy/js-util
Advanced tools
Comparing version 1.5.1 to 1.5.2
@@ -39,3 +39,3 @@ "use strict"; | ||
var getRenditions = function (type, images, video) { | ||
return type === 'video' && video && video.previews ? video.previews : images; | ||
return type === 'video' && video && video.previews && !Object.keys(images).length ? video.previews : images; | ||
}; | ||
@@ -42,0 +42,0 @@ exports.getBestRendition = function (images, gifWidth, gifHeight, scaleUpMaxPixels) { |
@@ -11,3 +11,3 @@ { | ||
"name": "@giphy/js-util", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"main": "dist/index.js", | ||
@@ -30,3 +30,3 @@ "description": "Shared giphy js utils", | ||
}, | ||
"gitHead": "296180057a9d81c5d47a325cd3eff8c4b1c69b35" | ||
"gitHead": "5bfe769294667ac946df8e890345b7fe5b328df9" | ||
} |
@@ -34,3 +34,3 @@ import { take, pick, without } from './collections' | ||
const getRenditions = (type: 'video' | 'gif', images: IImages, video?: IVideo) => | ||
type === 'video' && video && video.previews ? video.previews : images | ||
type === 'video' && video && video.previews && !Object.keys(images).length ? video.previews : images | ||
@@ -37,0 +37,0 @@ export const getBestRendition = ( |
Sorry, the diff of this file is not supported yet
53119