Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

fix(motion-photo): correct bigint comparison in toBoolean function

Timothy Yin7386e1dbd0ad
diff --git a/server/services/video/motion-photo.ts b/server/services/video/motion-photo.ts
index b5c1597d..9d007922 100644
--- a/server/services/video/motion-photo.ts
+++ b/server/services/video/motion-photo.ts
@@ -27,7 +27,7 @@ const toBoolean = (value: unknown): boolean => {
if (value === null || value === undefined) return false
if (typeof value === 'boolean') return value
if (typeof value === 'number') return value !== 0
- if (typeof value === 'bigint') return value !== 0n
+ if (typeof value === 'bigint') return value !== BigInt(0)
if (typeof value === 'string') {
const normalized = value.trim().toLowerCase()
return normalized === '1' || normalized === 'true' || normalized === 'yes'