Skip to content

Commit

Permalink
fix: fix image upload
Browse files Browse the repository at this point in the history
  • Loading branch information
akram-r committed Jan 25, 2024
1 parent 7fa1f8b commit 5c1ecab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/modules/artboard/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const getArtboardDimensions = (
const width = artboard.width;
const height = artboard.height;

if (!width || !height) {
if (width === undefined || height === undefined) {
throw new Error('Artboard dimensions not found');
}

Expand Down
2 changes: 1 addition & 1 deletion src/modules/image/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const getScaledPosition = (artboard: fabric.Rect): { left: number; top: n
const width = artboard.width;
const height = artboard.height;

if (!left || !top || !width || !height) {
if (left === undefined || top === undefined || width === undefined || height === undefined) {
throw new Error('Artboard dimensions not found');
}

Expand Down

0 comments on commit 5c1ecab

Please sign in to comment.