[gnome-maps/wip/refactor2: 8/9] HTTP: Supress loopfunc warning for now



commit 1d4934f045427c62419eaf67f55316bc0e246e58
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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=699967

 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]