File tree 1 file changed +2
-2
lines changed
Sources/WordPressKit/Models
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ public struct RemotePostUpdateParametersWordPressComEncoder: Encodable {
236
236
try container. encodeIfPresent ( parameters. excerpt, forKey: . excerpt)
237
237
try container. encodeIfPresent ( parameters. slug, forKey: . slug)
238
238
if let value = parameters. featuredImageID {
239
- if let featuredImageID = value {
239
+ if value != nil {
240
240
try container. encode ( parameters. featuredImageID, forKey: . featuredImageID)
241
241
} else {
242
242
// Passing `null` doesn't work.
@@ -340,7 +340,7 @@ public struct RemotePostUpdateParametersXMLRPCEncoder: Encodable {
340
340
try container. encodeIfPresent ( parameters. excerpt, forKey: . excerpt)
341
341
try container. encodeIfPresent ( parameters. slug, forKey: . slug)
342
342
if let value = parameters. featuredImageID {
343
- if let featuredImageID = value {
343
+ if value != nil {
344
344
try container. encode ( parameters. featuredImageID, forKey: . featuredImageID)
345
345
} else {
346
346
// Passing `null` doesn't work.
You can’t perform that action at this time.
0 commit comments