Skip to content

Commit

Permalink
Use destructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Nov 14, 2022
1 parent 1061281 commit 319ddcd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/svg-sprite/shape.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,9 @@ SVGShape.prototype._determineDimensions = function(cb) {
const calculateSvgDimensions = require('./utils/calculate-svg-dimensions.js');

try {
const dimension = calculateSvgDimensions(this.getSVG(false));
this.height = this._round(dimension.height);
this.width = this._round(dimension.width);
const { width, height } = calculateSvgDimensions(this.getSVG(false));
this.height = this._round(height);
this.width = this._round(width);
cb(null);
} catch (error) {
cb(error);
Expand Down

0 comments on commit 319ddcd

Please sign in to comment.