[Notification] Fix remove - invalid id
authorPawel Kaczmarek <p.kaczmarek3@samsung.com>
Tue, 24 Mar 2015 09:51:44 +0000 (10:51 +0100)
committerPawel Sikorski <p.sikorski@samsung.com>
Tue, 24 Mar 2015 15:39:47 +0000 (00:39 +0900)
[Verification]
TCT NotificationManager_remove_id_invalid should pass

Change-Id: Id8f747020533cb3e651a5dc6e63ea2b604f2a69f
Signed-off-by: Pawel Kaczmarek <p.kaczmarek3@samsung.com>
src/notification/notification_api.js

index afdac6d95a4b77b172b8ee06e327b074e6ca0b75..c3416af4112b0f7c9ac064b8dddf91f03c535420 100644 (file)
@@ -94,7 +94,7 @@ NotificationManager.prototype.remove = function(id) {
     {name: 'id', type: types_.STRING}
   ]);
 
-  if (!arguments.length) {
+  if (!arguments.length || !(parseInt(arguments[0]) > 0)) {
     throw new WebAPIException(WebAPIException.NOT_FOUND_ERR);
   }