Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/utils.js

Issue 6341149593698304: Issue 301 - Change for each to for .. of .. in lib/ (Closed)
Patch Set: Created April 10, 2014, 5:02 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/ui.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/utils.js
===================================================================
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -310,17 +310,17 @@ let Utils = exports.Utils =
* returns matching prefix if any.
*/
checkLocalePrefixMatch: function(/**String*/ prefixes) /**String*/
{
if (!prefixes)
return null;
let appLocale = Utils.appLocale;
- for each (let prefix in prefixes.split(/,/))
+ for (let prefix of prefixes.split(/,/))
if (new RegExp("^" + prefix + "\\b").test(appLocale))
return prefix;
return null;
},
/**
* Chooses the best filter subscription for user's language.
« no previous file with comments | « lib/ui.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld