Fix false unit not recognized warning
This commit is contained in:
parent
0d36c1034b
commit
bf1b308750
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
+ (double) convert:(nullable NSString *)unit
|
+ (double) convert:(nullable NSString *)unit
|
||||||
{
|
{
|
||||||
if ([unit isEqual:[NSNull null]])
|
if (!unit || [unit isEqual:[NSNull null]])
|
||||||
return 1.0;
|
return 1.0;
|
||||||
|
|
||||||
if ([unit isEqualToString:@"in"])
|
if ([unit isEqualToString:@"in"])
|
||||||
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
if (![unit isEqualToString:@"pp"])
|
if (![unit isEqualToString:@"pp"])
|
||||||
{
|
{
|
||||||
NSLog(@"[cordova-plugin-printer] unit not recogniced: %@", unit);
|
NSLog(@"[cordova-plugin-printer] unit not recognized: %@", unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1.0;
|
return 1.0;
|
||||||
|
Loading…
Reference in New Issue
Block a user