Skip to content

Commit 1709263

Browse files
committed
Fix Swift protocol generator lint
1 parent c5215b5 commit 1709263

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/protocol-gen-swift.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ function swiftInitializerParam(params: {
190190
if (params.required) {
191191
return `${params.name}: ${type}`;
192192
}
193-
const defaultNil = DEFAULTED_OPTIONAL_INIT_PARAMS[params.structName]?.has(params.key) === true;
193+
const defaultNil = DEFAULTED_OPTIONAL_INIT_PARAMS[params.structName]?.has(params.key) ?? false;
194194
return `${params.name}: ${type}?${defaultNil ? " = nil" : ""}`;
195195
}
196196

0 commit comments

Comments
 (0)