forked from XiaoMo/ChatGPT-Next-Web
Merge pull request #2713 from kfear1337/CodeQL-Report
This commit is contained in:
commit
6d8416f838
@ -174,7 +174,7 @@ export function SideBar(props: { className?: string }) {
|
|||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles["sidebar-action"]}>
|
<div className={styles["sidebar-action"]}>
|
||||||
<a href={REPO_URL} target="_blank">
|
<a href={REPO_URL} target="_blank" rel="noopener noreferrer">
|
||||||
<IconButton icon={<GithubIcon />} shadow />
|
<IconButton icon={<GithubIcon />} shadow />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
export function merge(target: any, source: any) {
|
export function merge(target: any, source: any) {
|
||||||
Object.keys(source).forEach(function (key) {
|
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]);
|
merge((target[key] = target[key] || {}), source[key]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
target[key] = source[key];
|
target[key] = source[key];
|
||||||
});
|
});
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user