From: Lukasz Kostyra Date: Thu, 2 Nov 2017 14:16:03 +0000 (+0100) Subject: Fix JSHint errors X-Git-Tag: submit/tizen/20191113.044831~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ed6c7e7ee04e3df2db253cd1cfdcbac66acc073;p=platform%2Fcore%2Fwebapi%2Flibteec.git Fix JSHint errors Change-Id: I0e3a3ea5d82686a65af0d26588f53ad56b2bd884 --- 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);