diff --git a/src/plot_api/to_image.js b/src/plot_api/to_image.js index 11491416f01..a9af220d2c3 100644 --- a/src/plot_api/to_image.js +++ b/src/plot_api/to_image.js @@ -142,12 +142,12 @@ function toImage(gd, opts) { var layoutImage = Lib.extendFlat({}, layout); if(width) { layoutImage.width = width; - } else if(opts.width === null && isNumeric(fullLayout.width)) { + } else if(opts.width == null && isNumeric(fullLayout.width)) { layoutImage.width = fullLayout.width; } if(height) { layoutImage.height = height; - } else if(opts.height === null && isNumeric(fullLayout.height)) { + } else if(opts.height == null && isNumeric(fullLayout.height)) { layoutImage.height = fullLayout.height; }