From 2ed6c7e7ee04e3df2db253cd1cfdcbac66acc073 Mon Sep 17 00:00:00 2001 From: Lukasz Kostyra Date: Thu, 2 Nov 2017 15:16:03 +0100 Subject: [PATCH] Fix JSHint errors Change-Id: I0e3a3ea5d82686a65af0d26588f53ad56b2bd884 --- src/teec/libteec_api.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/teec/libteec_api.js b/src/teec/libteec_api.js index 92e3e04..3568a1d 100644 --- a/src/teec/libteec_api.js +++ b/src/teec/libteec_api.js @@ -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); -- 2.34.1