Skip to content

Commit

Permalink
fixed issue with nil notes
Browse files Browse the repository at this point in the history
  • Loading branch information
brettalcox committed Mar 6, 2016
1 parent 75ee6af commit f1a7116
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 5 additions & 1 deletion logU/EditLift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions logU/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3</string>
<string>1.3.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>17</string>
<string>18</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
6 changes: 5 additions & 1 deletion logU/LogLift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f1a7116

Please sign in to comment.