mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
bug fixing
This commit is contained in:
parent
d151c56e77
commit
f5e51212d2
@ -44,7 +44,7 @@ export class GalleryManager implements IGalleryManager {
|
||||
cb(null, dir); //WARNING: only on the fly indexing should happen after this point
|
||||
|
||||
//on the fly updating
|
||||
this.indexDirectory(relativeDirectoryName, cb);
|
||||
return this.indexDirectory(relativeDirectoryName, cb);
|
||||
}
|
||||
return this.indexDirectory(relativeDirectoryName, cb);
|
||||
|
||||
|
@ -27,6 +27,7 @@ export class GridPhoto {
|
||||
this.replacementSizeCache = null;
|
||||
|
||||
let size = this.getThumbnailSize();
|
||||
if (!!this.photo.readyThumbnails) {
|
||||
for (let i = 0; i < this.photo.readyThumbnails.length; i++) {
|
||||
if (this.photo.readyThumbnails[i] < size) {
|
||||
this.replacementSizeCache = this.photo.readyThumbnails[i];
|
||||
@ -34,6 +35,7 @@ export class GridPhoto {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.replacementSizeCache;
|
||||
}
|
||||
|
||||
@ -42,7 +44,7 @@ export class GridPhoto {
|
||||
}
|
||||
|
||||
isThumbnailAvailable() {
|
||||
return this.photo.readyThumbnails.indexOf(this.getThumbnailSize()) != -1;
|
||||
return this.photo.readyThumbnails && this.photo.readyThumbnails.indexOf(this.getThumbnailSize()) != -1;
|
||||
}
|
||||
|
||||
getReplacementThumbnailPath() {
|
||||
|
Loading…
Reference in New Issue
Block a user