[gnome-maps/wip/refactor2] HTTP: Supress loopfunc warning for now
- From: Mattias Bengtsson <mattiasb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/refactor2] HTTP: Supress loopfunc warning for now
- Date: Wed, 15 Oct 2014 23:06:50 +0000 (UTC)
commit 8e63a4df433ab5f1c0fd91ddf2b21736379f353b
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date: Wed Oct 15 05:15:24 2014 +0200
HTTP: Supress loopfunc warning for now
JSHint warns when you create functions inside loops since closures in
combination with function scoping can be very unintuitive.
We should probably keep that behaviour but that means we get a warning
in the http module (for entirely safe code), so supress that warning.
src/http.js | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/http.js b/src/http.js
index 0d9b102..bc50364 100644
--- a/src/http.js
+++ b/src/http.js
@@ -58,6 +58,8 @@ const Query = new Lang.Class({
for(let key in this._query) {
let values = this._query[key];
let encKey = encode(key);
+
+ /* jshint loopfunc: true */
values.forEach(function(value) {
let encValue = encode(value);
if(encValue !== null)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]