Restrict "readerWidth" value migration regex

This commit is contained in:
schroda
2024-12-11 11:28:56 +01:00
parent 08f517fb36
commit b2a0ca979a

View File

@@ -291,7 +291,7 @@ export const METADATA_MIGRATIONS: IMetadataMigration[] = [
// END: fitPageToWindow
{
key: 'readerWidth',
oldValue: /[0-9]+/g,
oldValue: /^[0-9]+$/g,
newValue: (oldValue) => JSON.stringify({ value: Number(oldValue), enabled: true }),
},
],