Skip to content

Commit

Permalink
fixed wrong tests
Browse files Browse the repository at this point in the history
  • Loading branch information
asturur committed Aug 21, 2022
1 parent 5d843a4 commit bfee157
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/util/misc/svgParsing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ type TPreserveArParsed = {
// align can be either none or undefined or a combination of mid/max
const parseAlign = (align: string): MinMidMax[] => {
//divide align in alignX and alignY
if (align !== MinMidMax.none) {
if (align && align !== MinMidMax.none) {
return [
align.slice(1, 4) as MinMidMax,
align.slice(5, 8) as MinMidMax,
Expand Down
12 changes: 6 additions & 6 deletions test/unit/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@
y: '0',
width: '70',
height: '170',
preserveAspectRatio: 'meet xMidYMid',
preserveAspectRatio: 'xMidYMid meet',
'xlink:href': IMAGE_DATA_URL
});

Expand Down Expand Up @@ -676,7 +676,7 @@
y: '0',
width: '70',
height: '170',
preserveAspectRatio: 'meet xMidYMax',
preserveAspectRatio: 'xMidYMax meet',
'xlink:href': IMAGE_DATA_URL
});

Expand Down Expand Up @@ -705,7 +705,7 @@
y: '0',
width: '70',
height: '170',
preserveAspectRatio: 'meet xMidYMin',
preserveAspectRatio: 'xMidYMin meet',
'xlink:href': IMAGE_DATA_URL
});

Expand Down Expand Up @@ -734,7 +734,7 @@
y: '0',
width: '140',
height: '85',
preserveAspectRatio: 'meet xMinYMin',
preserveAspectRatio: 'xMinYMin meet',
'xlink:href': IMAGE_DATA_URL
});

Expand Down Expand Up @@ -763,7 +763,7 @@
y: '0',
width: '140',
height: '85',
preserveAspectRatio: 'meet xMidYMin',
preserveAspectRatio: 'xMidYMin meet',
'xlink:href': IMAGE_DATA_URL
});

Expand Down Expand Up @@ -792,7 +792,7 @@
y: '0',
width: '140',
height: '85',
preserveAspectRatio: 'meet xMaxYMin',
preserveAspectRatio: 'xMaxYMin meet',
'xlink:href': IMAGE_DATA_URL
});

Expand Down

0 comments on commit bfee157

Please sign in to comment.