Skip to content

Commit 7f5f3a8

Browse files
committed
.
1 parent 4772062 commit 7f5f3a8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ if (cluster.isMaster) {
150150
if (left <= 0) {
151151
console.log('Done scanning, no new images');
152152
newimages.sort(function (a,b) {
153-
return a.id > b.id;
153+
return a.id - b.id;
154154
});
155155
images = newimages;
156156
fs.writeFile(config.image_store_path, JSON.stringify(newimages), 'utf8', function (err) {
@@ -175,7 +175,7 @@ if (cluster.isMaster) {
175175
if (!--left) {
176176
console.log('Done scanning');
177177
newimages.sort(function (a,b) {
178-
return a.id > b.id;
178+
return a.id - b.id;
179179
});
180180
images = newimages;
181181
fs.writeFile(config.image_store_path, JSON.stringify(newimages), 'utf8', function (err) {

0 commit comments

Comments
 (0)