From f1a711610c1f0c47d926638ec5622a09ff4d5e79 Mon Sep 17 00:00:00 2001 From: Brett Alcox Date: Sun, 6 Mar 2016 17:34:58 -0600 Subject: [PATCH] fixed issue with nil notes --- logU/EditLift.swift | 6 +++++- logU/Info.plist | 4 ++-- logU/LogLift.swift | 6 +++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/logU/EditLift.swift b/logU/EditLift.swift index e6ce566..bfa4cfe 100644 --- a/logU/EditLift.swift +++ b/logU/EditLift.swift @@ -141,7 +141,11 @@ class EditLift: FormViewController { stringReps = String((form.values()["Reps"]!)!) stringWeight = String((form.values()["Weight"]!)!) stringIntensity = String((form.values()["Intensity"]!)!) - noteValue = String((form.values()["Notes"]!)!) + if (form.values()["Notes"]!) == nil { + noteValue = "" + } else { + noteValue = String((form.values()["Notes"]!)!) + } if lift == "Squat" { shouldUpdateSquat = true diff --git a/logU/Info.plist b/logU/Info.plist index e3de1a7..a24dba8 100644 --- a/logU/Info.plist +++ b/logU/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.3 + 1.3.1 CFBundleSignature ???? CFBundleVersion - 17 + 18 LSRequiresIPhoneOS UILaunchStoryboardName diff --git a/logU/LogLift.swift b/logU/LogLift.swift index dfb69bf..624987a 100644 --- a/logU/LogLift.swift +++ b/logU/LogLift.swift @@ -72,7 +72,11 @@ class LogLift: FormViewController { rep = String((form.values()["Reps"]!)!) weight = String((form.values()["Weight"]!)!) intensity = String((form.values()["Intensity"]!)!) - notes = String((form.values()["Notes"]!)!) + if (form.values()["Notes"]!) == nil { + notes = "" + } else { + notes = String((form.values()["Notes"]!)!) + } if lift == "Squat" { shouldUpdateSquat = true