Skip to content

Commit

Permalink
fix(shapes): fabric.Object._fromObject never should return (#7201)
Browse files Browse the repository at this point in the history
  • Loading branch information
rockerBOO authored Jul 16, 2021
1 parent c36ef82 commit e6d16d3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/shapes/circle.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@
* @memberOf fabric.Circle
* @param {Object} object Object to create an instance from
* @param {function} [callback] invoked with new instance as first argument
* @return {Object} Instance of fabric.Circle
* @return {void}
*/
fabric.Circle.fromObject = function(object, callback) {
return fabric.Object._fromObject('Circle', object, callback);
fabric.Object._fromObject('Circle', object, callback);
};

})(typeof exports !== 'undefined' ? exports : this);
4 changes: 2 additions & 2 deletions src/shapes/ellipse.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@
* @memberOf fabric.Ellipse
* @param {Object} object Object to create an instance from
* @param {function} [callback] invoked with new instance as first argument
* @return {fabric.Ellipse}
* @return {void}
*/
fabric.Ellipse.fromObject = function(object, callback) {
return fabric.Object._fromObject('Ellipse', object, callback);
fabric.Object._fromObject('Ellipse', object, callback);
};

})(typeof exports !== 'undefined' ? exports : this);
3 changes: 2 additions & 1 deletion src/shapes/polygon.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@
* @memberOf fabric.Polygon
* @param {Object} object Object to create an instance from
* @param {Function} [callback] Callback to invoke when an fabric.Path instance is created
* @return {void}
*/
fabric.Polygon.fromObject = function(object, callback) {
return fabric.Object._fromObject('Polygon', object, callback, 'points');
fabric.Object._fromObject('Polygon', object, callback, 'points');
};

})(typeof exports !== 'undefined' ? exports : this);

0 comments on commit e6d16d3

Please sign in to comment.