Skip to content

Commit a2ede9b

Browse files
committed
code clean up
1 parent d4bdf4d commit a2ede9b

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

Sources/BuilderIO/Schemas/BuilderBlockModel.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,6 @@ public struct BuilderBlockModel: Codable, Identifiable {
1313
public var meta: AnyCodable? = nil // Replaced JSON? with AnyCodable?, default to nil
1414
public var linkUrl: String? = nil
1515

16-
// Important: Initialize optionals correctly.
17-
// If these fields are truly optional and might be missing from JSON,
18-
// they should be nil by default, not empty dictionaries,
19-
// unless an empty dictionary is the desired default for a missing field.
20-
// I've changed them to 'nil' for AnyCodable, as that's a more natural default
21-
// for a potentially missing arbitrary JSON value.
22-
// If the JSON for 'actions' for example is '{ "actions": {} }', it will decode
23-
// as .dictionary([:])
24-
// If the JSON for 'actions' is '{ "actions": null }' or '{ }' (missing), it will decode as nil.
2516
}
2617

2718
public struct BuilderBlockComponent: Codable {

0 commit comments

Comments
 (0)