web/data/cubicweb.widgets.js
brancholdstable
changeset 7258 2e7f0d6fa2d6
parent 6890 1b2fcb9356a3
child 7943 ad0581296e2c
--- a/web/data/cubicweb.widgets.js	Wed Apr 27 09:54:22 2011 +0200
+++ b/web/data/cubicweb.widgets.js	Thu Apr 28 08:18:48 2011 +0200
@@ -491,8 +491,8 @@
         var group = null;
         var variableRegexp = /%\((\w+)\)s/g;
         // emulates rgx.findAll()
-        while (group = variableRegexp.exec(text)) {
-            if (!$.inArray(group[1], self.variables)) {
+        while ( (group = variableRegexp.exec(text)) ) {
+            if ($.inArray(group[1], self.variables) == -1) {
                 unknownVariables.push(group[1]);
             }
             it++;