Skip to content

Commit

Permalink
textarea optional string init
Browse files Browse the repository at this point in the history
  • Loading branch information
tib committed Dec 18, 2021
1 parent dccd891 commit 85813b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/SwiftHtml/Html/Tags/Textarea.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
/// **Tip:** Always add the `<label>` tag for best accessibility practices!
public final class Textarea: Tag {

public init(_ contents: String) {
super.init(Node(type: .standard, name: "textarea", contents: contents))
public init(_ contents: String? = nil) {
super.init(Node(type: .standard, name: "textarea", contents: contents ?? ""))
}
}

Expand Down

0 comments on commit 85813b7

Please sign in to comment.