Handle multiple prefixes in metadata value migration
Was never updated after the change that made it possible that metadata can have multiple prefixes (e.g. device names)
This commit is contained in:
@@ -95,18 +95,11 @@ const applyMetadataValueMigration = (meta: Metadata, migration: IMetadataMigrati
|
||||
};
|
||||
|
||||
const migrateValueOfAllAppKeys = key === undefined;
|
||||
if (migrateValueOfAllAppKeys) {
|
||||
Object.keys(appMetadata).forEach((metaKey) => {
|
||||
Object.keys(appMetadata).forEach((metaKey) => {
|
||||
if (migrateValueOfAllAppKeys || metaKey.endsWith(key)) {
|
||||
migrateValue(metaKey);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!doesMetadataKeyExistIn(meta, key, undefined, appKeyPrefix)) {
|
||||
return;
|
||||
}
|
||||
|
||||
migrateValue(getMetadataKey(key, undefined, appKeyPrefix));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return migratedMetadata;
|
||||
|
||||
Reference in New Issue
Block a user