[WidgetService] Unify way of checking watchId in webapi plugins. 12/192712/2
authorLukasz Bardeli <l.bardeli@AMDC967.digital.local>
Tue, 20 Nov 2018 09:25:54 +0000 (10:25 +0100)
committerLukasz Bardeli <l.bardeli@AMDC967.digital.local>
Tue, 20 Nov 2018 09:25:54 +0000 (10:25 +0100)
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 <l.bardeli@AMDC967.digital.local>
src/widgetservice/widgetservice_api.js

index a534fd2837c1048ed5b4781dfa3ffdafb3dc6c53..e09d3fb0ee55fc005d4dddd8eb4ee79a28a1f744 100644 (file)
@@ -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];
   }