From: Lukasz Bardeli Date: Tue, 20 Nov 2018 09:25:54 +0000 (+0100) Subject: [WidgetService] Unify way of checking watchId in webapi plugins. X-Git-Tag: submit/tizen_5.0/20181126.103411~6^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7b9a05335558460e905f243ad803a6cde553da9d;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [WidgetService] Unify way of checking watchId in webapi plugins. Unify the way of how passed argument is checked in removeListener methods to be consistent with other modules in webapi plugins. [Verification] Code compiles without error. I/StarFish(22486): console.log: [tct-widgetservice-tizen-test] - 85 passed, 0 failed, 0 timed out, 0 not run. Change-Id: I904e4f8ef8b536b2a5c0fc22c3aee2b897c7b90b Signed-off-by: Lukasz Bardeli --- diff --git a/src/widgetservice/widgetservice_api.js b/src/widgetservice/widgetservice_api.js index a534fd28..e09d3fb0 100644 --- a/src/widgetservice/widgetservice_api.js +++ b/src/widgetservice/widgetservice_api.js @@ -344,10 +344,6 @@ ListenerManager.prototype.addListener = function(callback) { }; ListenerManager.prototype.removeListener = function(watchId) { - if (this.listeners[watchId] === null || this.listeners[watchId] === undefined) { - return; - } - if (this.listeners.hasOwnProperty(watchId)) { delete this.listeners[watchId]; }