Skip to content

Commit a9f8724

Browse files
author
James Zetlen
committed
test: remove wrong dpr impl
1 parent 9abb2cb commit a9f8724

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/lib/mappers/resize.spec.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,7 @@ const valid: Array<[
7878
];
7979

8080
type BadCase = [string, boolean];
81-
const invalid: BadCase[] = [
82-
['width=asgakshd', true],
83-
['width=15&height=aosiygdkj', false]
84-
];
81+
const invalid: BadCase[] = [['width=asgakshd', true]];
8582
const unsupported: BadCase[] = [
8683
['width=0.5', true],
8784
['height=50', true],

src/lib/mappers/resize.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ const resize: Mapper = (sharp, params) => {
5656
params.warn('invalid', 'width', 'resize with non-numeric width param');
5757
return false;
5858
}
59-
if (nums[1] && isNaN(height)) {
60-
params.warn('invalid', 'height', 'resize with non-numeric height param');
59+
if (isNaN(height)) {
6160
height = undefined;
6261
}
6362
debug('width %s, height %s, dpr %s', width, height, dpr);

0 commit comments

Comments
 (0)