Skip to content

Commit e3a25b4

Browse files
committed
Fix bug in toDpi()
1 parent defd61c commit e3a25b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ function toDecimal(ratio) {
6666
}
6767

6868
function toDpi(resolution) {
69-
var value = parseFloat(length),
70-
units = String(length).match(RE_RESOLUTION_UNIT)[1];
69+
var value = parseFloat(resolution),
70+
units = String(resolution).match(RE_RESOLUTION_UNIT)[1];
7171

7272
switch (units) {
7373
case 'dpcm': return value / 2.54;

0 commit comments

Comments
 (0)