mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
style: add perf rules (#5413)
This commit is contained in:
@@ -27,9 +27,9 @@ export const flattenTranslation = (
|
||||
if (!(obj instanceof Object)) return { [path ?? '']: obj };
|
||||
|
||||
return Object.keys(obj).reduce((output, key) => {
|
||||
return {
|
||||
...output,
|
||||
...flattenTranslation(obj[key], path ? path + '.' + key : key),
|
||||
};
|
||||
return Object.assign(
|
||||
output,
|
||||
flattenTranslation(obj[key], path ? path + '.' + key : key)
|
||||
);
|
||||
}, {});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user