File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 257
257
return ;
258
258
}
259
259
snippets . forEach ( function ( snippet ) {
260
- var result = snippet ;
260
+ var result = snippet ,
261
+ isSortBy = / v a r s o r t B y \b / . test ( result ) ;
261
262
262
263
// minify properties
263
264
properties . forEach ( function ( property , index ) {
265
+ // add quotes around properties in the inlined method of the mobile build
266
+ // so Closure Compiler won't mung them
267
+ if ( isSortBy ) {
268
+ result = result
269
+ . replace ( RegExp ( '\\.' + property + '\\b' , 'g' ) , "['" + minNames [ index ] + "']" )
270
+ . replace ( RegExp ( '\\b' + property + ' *:' , 'g' ) , "'" + minNames [ index ] + "':" ) ;
271
+ }
264
272
result = result . replace ( RegExp ( '\\b' + property + '\\b' , 'g' ) , minNames [ index ] ) ;
265
273
} ) ;
266
274
// replace with modified snippet
You can’t perform that action at this time.
0 commit comments