From ba1af7b60832ffd11b41c60be001fe79bc548783 Mon Sep 17 00:00:00 2001 From: Tsachi Shlidor Date: Tue, 2 Apr 2024 10:15:17 +0300 Subject: [PATCH] chore: isPlainObject (#598) --- src/plugins/playlist/playlist.js | 4 ++-- src/plugins/playlist/utils/api.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/playlist/playlist.js b/src/plugins/playlist/playlist.js index 36fa2eb8..9afd60d2 100644 --- a/src/plugins/playlist/playlist.js +++ b/src/plugins/playlist/playlist.js @@ -1,4 +1,4 @@ -import isObject from 'lodash/isObject'; +import isPlainObject from 'lodash/isPlainObject'; import { sliceProperties } from 'utils/slicing'; import { PLAYER_EVENT } from 'utils/consts'; import { getCloudinaryUrl } from 'plugins/cloudinary/common'; @@ -22,7 +22,7 @@ const playlist = (player, options = {}) => { playlistWidget.dispose(); } - if (isObject(options.playlistWidget)) { + if (isPlainObject(options.playlistWidget)) { if (player.fluid_) { options.playlistWidget.fluid = true; } diff --git a/src/plugins/playlist/utils/api.js b/src/plugins/playlist/utils/api.js index 4ae31d12..9b08e8dd 100644 --- a/src/plugins/playlist/utils/api.js +++ b/src/plugins/playlist/utils/api.js @@ -1,5 +1,5 @@ import camelCase from 'lodash/camelCase'; -import isObject from 'lodash/isObject'; +import isPlainObject from 'lodash/isPlainObject'; import { parseISO8601 } from './time'; const TIME_FIELDS = ['created_at', 'updated_at']; @@ -7,7 +7,7 @@ const TIME_FIELDS = ['created_at', 'updated_at']; const normalizeJsonResponse = (obj) => { const agg = {}; - if (isObject(obj)) { + if (isPlainObject(obj)) { Object.keys(obj).reduce((agg, key) => { const newKey = camelCase(key);