[Notification] Fix setting nullable properties. 97/273197/1 accepted/tizen/unified/20220412.100227 submit/tizen/20220407.074314
authorMarcin Bialek <m.bialek@samsung.com>
Thu, 31 Mar 2022 10:38:47 +0000 (12:38 +0200)
committerMarcin Bialek <m.bialek@samsung.com>
Thu, 31 Mar 2022 10:38:47 +0000 (12:38 +0200)
Some nullable properties could not be set to null.

[Verification] Code compiles. Fixes were tested on an emulator as well.

Change-Id: Ifb34d962909369c9f87b5e8958a814b2e5dc50c9
Signed-off-by: Marcin Bialek <m.bialek@samsung.com>
src/notification/notification_api.js

index 0f77e5d..3153e0c 100644 (file)
@@ -764,7 +764,7 @@ function NotificationDetailInfo(mainText, subText) {
                 return _subText;
             },
             set: function(v) {
-                _subText = type_.isString(v) ? v : _subText;
+                _subText = type_.isString(v) || type_.isNull(v) ? v : _subText;
             },
             enumerable: true
         }
@@ -1210,7 +1210,7 @@ function NotificationButton(text, appControl, imagePath) {
                 return _imagePath;
             },
             set: function(v) {
-                _imagePath = type_.isString(v) ? v : _imagePath;
+                _imagePath = type_.isString(v) || type_.isNull(v) ? v : _imagePath;
             },
             enumerable: true
         }