pre-sort by title to take advantange of stable sort; watch for null date
This commit is contained in:
		@@ -29,6 +29,7 @@
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    function renderTable(data, sortField) {
 | 
					    function renderTable(data, sortField) {
 | 
				
			||||||
 | 
					      data = _.sortBy(data, 'title');
 | 
				
			||||||
      data = _.sortBy(data, sortField);
 | 
					      data = _.sortBy(data, sortField);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      $.each(data, function(key, value) {
 | 
					      $.each(data, function(key, value) {
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								index.js
									
									
									
									
									
								
							@@ -142,7 +142,7 @@ function normalizeGoogleData(book) {
 | 
				
			|||||||
    publisher: _.trim(book.publisher, '"'),
 | 
					    publisher: _.trim(book.publisher, '"'),
 | 
				
			||||||
    series: '',
 | 
					    series: '',
 | 
				
			||||||
    volume: '',
 | 
					    volume: '',
 | 
				
			||||||
    publishedDate: book.publishedDate.substring(0, 4),
 | 
					    publishedDate: book.publishedDate ? book.publishedDate.substring(0, 4) : '',
 | 
				
			||||||
    coverurl: '',
 | 
					    coverurl: '',
 | 
				
			||||||
    description: book.description,
 | 
					    description: book.description,
 | 
				
			||||||
    notes: '',
 | 
					    notes: '',
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user