Skip to content

Commit

Permalink
Simplify variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
e1himself committed May 4, 2022
1 parent 635312e commit bd7267d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/lib/UploadcareImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,13 @@ export class UploadcareImage {
});
};

public srcSet = (resizeWidth: number): string => {
const width = this.width;

if (width < resizeWidth * 2) {
public srcSet = (width: number): string => {
if (this.width < width * 2) {
return '';
}

const src1x = this.resize(resizeWidth).cdnUrl;
const src2x = this.resize(resizeWidth * 2).cdnUrl;
const src1x = this.resize(width).cdnUrl;
const src2x = this.resize(width * 2).cdnUrl;

return `${src1x} 1x, ${src2x} 2x`;
};
Expand Down

0 comments on commit bd7267d

Please sign in to comment.