From: Marcin Bialek Date: Thu, 31 Mar 2022 10:38:47 +0000 (+0200) Subject: [Notification] Fix setting nullable properties. X-Git-Tag: submit/tizen/20220407.074314^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F97%2F273197%2F1;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Notification] Fix setting nullable properties. 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 --- diff --git a/src/notification/notification_api.js b/src/notification/notification_api.js index 0f77e5dc..3153e0c4 100644 --- a/src/notification/notification_api.js +++ b/src/notification/notification_api.js @@ -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 }