Skip to content

Commit eb8d2c6

Browse files
authored
Merge pull request #213 from virtusize/bugfix/NSDK-383-no-size-hotfix
NSDK-383: no avaialble size fix when no WillFit API parameter
2 parents ab6381c + c97b909 commit eb8d2c6

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Virtusize/Sources/Models/VirtusizeServerProduct.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public class VirtusizeServerProduct: Codable {
158158
// For one-size products with body data provided
159159
if hasBodyData {
160160
// If willFit is true and we have a recommended size, show the will fit message
161-
if bodyProfileWillFit == true {
161+
if bodyProfileWillFit != false {
162162
return i18nLocalization.getOneSizeBodyProfileText()
163163
}
164164
// If willFit is false or no recommended size, show "Your size not found"
@@ -187,7 +187,11 @@ public class VirtusizeServerProduct: Codable {
187187
// For multi-size products with body data provided
188188
if hasBodyData {
189189
// If willFit is true and we have a recommended size, show it
190-
if bodyProfileWillFit == true, let bodyProfileRecommendedSizeName = bodyProfileRecommendedSizeName, !bodyProfileRecommendedSizeName.isEmpty {
190+
if
191+
bodyProfileWillFit != false,
192+
let bodyProfileRecommendedSizeName = bodyProfileRecommendedSizeName,
193+
!bodyProfileRecommendedSizeName.isEmpty
194+
{
191195
return i18nLocalization.getMultiSizeBodyProfileText(bodyProfileRecommendedSizeName)
192196
}
193197
// If willFit is false or no recommended size, show "Your size not found"

0 commit comments

Comments
 (0)