Fix JSHint errors 20/158720/3
authorLukasz Kostyra <l.kostyra@samsung.com>
Thu, 2 Nov 2017 14:16:03 +0000 (15:16 +0100)
committerLukasz Kostyra <l.kostyra@samsung.com>
Tue, 7 Nov 2017 08:39:01 +0000 (09:39 +0100)
Change-Id: I0e3a3ea5d82686a65af0d26588f53ad56b2bd884

src/teec/libteec_api.js

index 92e3e04887e1663136f046f49d389843d84424f5..3568a1df8d91ad8bea789964ef4a2ad6a2c8a0e8 100644 (file)
@@ -28,13 +28,13 @@ function ListenerManager(native, listenerName, handle) {
     this.nativeSet = false;
     this.native = native;
     this.listenerName = listenerName;
-    this.handle = handle || function() {};
+    this.handle = handle || function() { return undefined; };
 }
 
 ListenerManager.prototype.addListener = function(callback, nativeCall, data) {
     var id = this.nextId;
-    if (!this.nativeSet) {
-        this.native.addListener(this.listenerName, function(msg) {
+    if (!nativeSet) {
+        native.addListener(listenerName, function(msg) {
             for (var watchId in this.listeners) {
                 if (this.listeners.hasOwnProperty(watchId)) {
                     this.handle(msg, this.listeners[watchId], watchId);
@@ -197,7 +197,7 @@ TeecSession.prototype.invokeCommand =
             default:
                 throw new WebAPIException(WebAPIException.INVALID_VALUES_ERR,
                     'Received incorrect param object from plugin');
-            };
+            }
         }
 
         native_.callIfPossible(args.successCallback, retArgs.cmd, params);