File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Sources/SwiftHtml/Html/Tags Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -70,16 +70,18 @@ public extension Form {
7070 }
7171
7272 /// Specifies how the form-data should be encoded when submitting it to the server (only for method="post")
73- func enctype( _ value: Enctype , _ condition: Bool = true ) -> Self {
74- if condition {
73+ func enctype( _ value: Enctype ? , _ condition: Bool = true ) -> Self {
74+ if let value = value , condition {
7575 node. upsert ( Attribute ( key: " enctype " , value: value. rawValue) )
7676 }
7777 return self
7878 }
7979
8080 /// Specifies the HTTP method to use when sending form-data
81- func method( _ value: Method ) -> Self {
82- node. upsert ( Attribute ( key: " method " , value: value. rawValue) )
81+ func method( _ value: Method ? ) -> Self {
82+ if let value = value {
83+ node. upsert ( Attribute ( key: " method " , value: value. rawValue) )
84+ }
8385 return self
8486 }
8587
You can’t perform that action at this time.
0 commit comments