Changeset 50021
- Timestamp:
- 01/26/2021 05:24:15 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/media/models/query.js
r48650 r50021 244 244 orderby = Query.orderby, 245 245 defaults = Query.defaultProps, 246 query, 247 cache = !! props.cache || _.isUndefined( props.cache ); 246 query; 248 247 249 248 // Remove the `query` property. This isn't linked to a query, 250 249 // this *is* the query. 251 250 delete props.query; 252 delete props.cache;253 251 254 252 // Fill default args. … … 289 287 args.orderby = orderby.valuemap[ props.orderby ] || props.orderby; 290 288 291 // Search the query cache for a matching query. 292 if ( cache ) { 293 query = _.find( queries, function( query ) { 294 return _.isEqual( query.args, args ); 295 }); 296 } else { 297 queries = []; 298 } 289 queries = []; 299 290 300 291 // Otherwise, create a new query and add it to the cache.
Note: See TracChangeset
for help on using the changeset viewer.