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

Unified Diff: include.preload.js

Issue 4759827771293696: Issue 2528 - Don't parse CSS selectors that have no comma (Closed)
Patch Set: Skip substring() as well Created May 15, 2015, 12:15 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include.preload.js
===================================================================
--- a/include.preload.js
+++ b/include.preload.js
@@ -150,9 +150,14 @@
for (var i = 0; i < selectors.length; i++)
{
var selector = selectors[i];
+ if (selector.indexOf(",") == -1)
+ {
+ result.push(prefix + selector);
+ continue;
+ }
+
var start = 0;
var sep = "";
-
for (var j = 0; j < selector.length; j++)
{
var chr = selector[j];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld