Skip to content

Commit f709572

Browse files
committed
Use Lib.isPlainObject instead of typeof
1 parent f3a292d commit f709572

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plot_api/plot_api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2654,7 +2654,7 @@ Plotly.animate = function(gd, frameOrGroupNameOrFrameList, animationOpts) {
26542654
var frameList = [];
26552655
var allFrames = frameOrGroupNameOrFrameList === undefined || frameOrGroupNameOrFrameList === null;
26562656
var isFrameArray = Array.isArray(frameOrGroupNameOrFrameList);
2657-
var isSingleFrame = !allFrames && !isFrameArray && typeof frameOrGroupNameOrFrameList === 'object';
2657+
var isSingleFrame = !allFrames && !isFrameArray && Lib.isPlainObject(frameOrGroupNameOrFrameList);
26582658

26592659
if(isSingleFrame) {
26602660
frameList.push(setTransitionConfig({

0 commit comments

Comments
 (0)