Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #70 from cweinberger/feature/fix-checkboxgroup
Browse files Browse the repository at this point in the history
Check for null before checking for bool value
  • Loading branch information
cweinberger authored Jun 20, 2018
2 parents 6e92dea + 81e7091 commit c00bf7b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Sources/AdminPanelProvider/Tags/Leaf/CheckboxGroup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ public final class CheckboxGroup: BasicTag {
}

// Retrieve input value, value from fieldset else passed default value
let inputValue = fieldset?["value"]?.bool ?? arguments[1]?.bool ?? false
var inputValue = arguments[1]?.bool ?? false
if let fieldsetValue = fieldset?["value"], fieldsetValue.isNull == false {
inputValue = fieldsetValue.bool ?? false
}

let label = fieldset?["label"]?.string ?? fieldsetPath

Expand Down

0 comments on commit c00bf7b

Please sign in to comment.