Skip to content

Commit 9f50138

Browse files
committed
fix: poster options
1 parent f138bbe commit 9f50138

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/plugins/cloudinary/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import isFunction from 'lodash/isFunction';
2+
import isEmpty from 'lodash/isEmpty';
23
import { applyWithProps } from 'utils/apply-with-props';
34
import { sliceAndUnsetProperties } from 'utils/slicing';
45
import { isKeyInTransformation } from 'utils/cloudinary';
@@ -127,7 +128,7 @@ class CloudinaryContext {
127128

128129

129130
const posterOptions = posterOptionsForCurrent();
130-
const hasUserPosterOptions = options.posterOptions && Object.keys(options.posterOptions).length > 0;
131+
const hasUserPosterOptions = !isEmpty(options.posterOptions);
131132

132133
if (options.poster === undefined) {
133134
if (isRawUrl(publicId)) {

0 commit comments

Comments
 (0)