Skip to content

Commit 85813b7

Browse files
committed
textarea optional string init
1 parent dccd891 commit 85813b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/SwiftHtml/Html/Tags/Textarea.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
/// **Tip:** Always add the `<label>` tag for best accessibility practices!
2121
public final class Textarea: Tag {
2222

23-
public init(_ contents: String) {
24-
super.init(Node(type: .standard, name: "textarea", contents: contents))
23+
public init(_ contents: String? = nil) {
24+
super.init(Node(type: .standard, name: "textarea", contents: contents ?? ""))
2525
}
2626
}
2727

0 commit comments

Comments
 (0)