diff --git a/src/shapes/rect.class.js b/src/shapes/rect.class.js index d051c89d1a8..c4550cee02e 100644 --- a/src/shapes/rect.class.js +++ b/src/shapes/rect.class.js @@ -184,6 +184,8 @@ parsedAttributes.left = parsedAttributes.left || 0; parsedAttributes.top = parsedAttributes.top || 0; + parsedAttributes.height = parsedAttributes.height || 0; + parsedAttributes.width = parsedAttributes.width || 0; var rect = new fabric.Rect(extend((options ? fabric.util.object.clone(options) : { }), parsedAttributes)); rect.visible = rect.visible && rect.width > 0 && rect.height > 0; callback(rect);