diff --git a/app/components/sidebar.tsx b/app/components/sidebar.tsx
index b0b778fc..634639f1 100644
--- a/app/components/sidebar.tsx
+++ b/app/components/sidebar.tsx
@@ -174,7 +174,7 @@ export function SideBar(props: { className?: string }) {
diff --git a/app/utils/merge.ts b/app/utils/merge.ts
index 758d6df8..fd7a4da9 100644
--- a/app/utils/merge.ts
+++ b/app/utils/merge.ts
@@ -1,9 +1,13 @@
export function merge(target: any, source: any) {
Object.keys(source).forEach(function (key) {
- if (source[key] && typeof source[key] === "object") {
+ if (
+ source.hasOwnProperty(key) && // Check if the property is not inherited
+ source[key] &&
+ typeof source[key] === "object" || key === "__proto__" || key === "constructor"
+ ) {
merge((target[key] = target[key] || {}), source[key]);
return;
}
target[key] = source[key];
});
-}
+}
\ No newline at end of file