fancy-banner. fix #18 #21
@ -318,8 +318,8 @@ exports.randomCovers = function (count, size, callback) {
 | 
			
		||||
    .find({ "covers.cover64": { $exists: true } })
 | 
			
		||||
    .project({ "covers.cover64": true })
 | 
			
		||||
    .toArray((err, result) => {
 | 
			
		||||
      let res = [];
 | 
			
		||||
      if (result.length > count) {
 | 
			
		||||
        let res = [];
 | 
			
		||||
        while (count-- > 0) {
 | 
			
		||||
          let rnd = randomNumber(0, result.length);
 | 
			
		||||
          res.push(result[rnd]);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user