From bf1b3087506ecc6176efd2ebe6295e8b1efc9a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Katzer?= Date: Fri, 25 Jan 2019 14:20:59 +0100 Subject: [PATCH] Fix false unit not recognized warning --- src/ios/APPPrinterUnit.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ios/APPPrinterUnit.m b/src/ios/APPPrinterUnit.m index a48ae73..34834fd 100644 --- a/src/ios/APPPrinterUnit.m +++ b/src/ios/APPPrinterUnit.m @@ -25,7 +25,7 @@ + (double) convert:(nullable NSString *)unit { - if ([unit isEqual:[NSNull null]]) + if (!unit || [unit isEqual:[NSNull null]]) return 1.0; if ([unit isEqualToString:@"in"]) @@ -39,7 +39,7 @@ if (![unit isEqualToString:@"pp"]) { - NSLog(@"[cordova-plugin-printer] unit not recogniced: %@", unit); + NSLog(@"[cordova-plugin-printer] unit not recognized: %@", unit); } return 1.0;