mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
Fixed: Translations for columns
(cherry picked from commit 6d53d2a153a98070c42d0619c15902b6bd5dfab4)
This commit is contained in:
@@ -36,10 +36,17 @@ function mergeColumns(path, initialState, persistedState, computedState) {
|
||||
const column = initialColumns.find((i) => i.name === persistedColumn.name);
|
||||
|
||||
if (column) {
|
||||
columns.push({
|
||||
...column,
|
||||
isVisible: persistedColumn.isVisible
|
||||
});
|
||||
const newColumn = {};
|
||||
|
||||
// We can't use a spread operator or Object.assign to clone the column
|
||||
// or any accessors are lost and can break translations.
|
||||
for (const prop of Object.keys(column)) {
|
||||
Object.defineProperty(newColumn, prop, Object.getOwnPropertyDescriptor(column, prop));
|
||||
}
|
||||
|
||||
newColumn.isVisible = persistedColumn.isVisible;
|
||||
|
||||
columns.push(newColumn);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user