mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-13 08:55:48 +01:00
🐛 Fix wrong position of wrapper when migrating from old schema
This commit is contained in:
@@ -131,10 +131,19 @@ const getConfigAndCreateIfNotExsists = (
|
||||
const category: CategoryType = {
|
||||
id: uuidv4(),
|
||||
name: categoryName,
|
||||
position: config.categories.length,
|
||||
position: config.categories.length + 1, // sync up with index of categories
|
||||
};
|
||||
|
||||
config.categories.push(category);
|
||||
|
||||
// sync up with categories
|
||||
if (config.wrappers.length < config.categories.length) {
|
||||
config.wrappers.push({
|
||||
id: uuidv4(),
|
||||
position: config.wrappers.length + 1, // sync up with index of categories
|
||||
});
|
||||
}
|
||||
|
||||
return category;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user