We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb42434 commit da7a79bCopy full SHA for da7a79b
Sources/LiveViewNative/Property Wrappers/Attribute.swift
@@ -199,8 +199,8 @@ extension Optional: AttributeDecodable where Wrapped: AttributeDecodable {
199
/// Decodes a string from an attribute, if the attribute is present.
200
extension String: AttributeDecodable {
201
public init(from attribute: LiveViewNativeCore.Attribute?, on element: ElementNode) throws {
202
- guard let attributeValue = attribute?.value else { throw AttributeDecodingError.missingAttribute(Self.self) }
203
- self = attributeValue
+ guard let attribute else { throw AttributeDecodingError.missingAttribute(Self.self) }
+ self = attribute.value ?? ""
204
}
205
206
0 commit comments