mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
checking for isNaN rather than undefined
This commit is contained in:
parent
d52d7c0c4d
commit
988eaf7cf0
@ -207,10 +207,10 @@ export class MetadataLoader {
|
|||||||
//in case of failure, set dimensions to 0 so they may be read via tags
|
//in case of failure, set dimensions to 0 so they may be read via tags
|
||||||
metadata.size = { width: 0, height: 0 };
|
metadata.size = { width: 0, height: 0 };
|
||||||
} finally {
|
} finally {
|
||||||
if (metadata.size.width == undefined || metadata.size.width == null) {
|
if (isNaN(metadata.size.width) || metadata.size.width == null) {
|
||||||
metadata.size.width = 0;
|
metadata.size.width = 0;
|
||||||
}
|
}
|
||||||
if (metadata.size.height == undefined || metadata.size.height == null) {
|
if (isNaN(metadata.size.height) || metadata.size.height == null) {
|
||||||
metadata.size.height = 0;
|
metadata.size.height = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user