From 1b6e270a76436d1b60374fcbedfb16f05333e8b9 Mon Sep 17 00:00:00 2001 From: Vasavi Kanamarlapudi Date: Thu, 15 Aug 2024 14:58:58 +0530 Subject: [PATCH] Digital ACT-191 ONEAPP-9314 story: price optional and may have nil --- VDSSample/ViewControllers/PriceLockupViewController.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/VDSSample/ViewControllers/PriceLockupViewController.swift b/VDSSample/ViewControllers/PriceLockupViewController.swift index 078e5a1..4a28700 100644 --- a/VDSSample/ViewControllers/PriceLockupViewController.swift +++ b/VDSSample/ViewControllers/PriceLockupViewController.swift @@ -82,8 +82,11 @@ class PriceLockupViewController: BaseViewController { priceTextField .numberPublisher .sink { [weak self] number in - guard let number else { return } - self?.component.price = number.floatValue + if let number { + self?.component.price = number.floatValue + } else { + self?.component.price = nil + } }.store(in: &subscribers) leadingTextField