Ticket #5380: selector.js.patch
| File selector.js.patch, 684 bytes (added by antonkovalyov, 3 years ago) |
|---|
-
src/selector.js
133 133 134 134 Sizzle.uniqueSort = function(results){ 135 135 if ( sortOrder ) { 136 hasDuplicate = false; 136 /* Here we check if the JavaScript engine is using some sort of 137 * optimization where it does not always call our comparision 138 * function. If that is the case, discard the hasDuplicate value. */ 139 hasDuplicate = true; 140 ['', ''].sort(function(a,b) { hasDuplicate = false; return 0; }); 137 141 results.sort(sortOrder); 138 142 139 143 if ( hasDuplicate ) { … … 144 148 } 145 149 } 146 150 } 147 148 151 return results; 149 152 }; 150 153
