fix: opts being overriden in graph option (#384)

This commit is contained in:
松浦 知也 Matsuura Tomoya 2023-08-22 00:45:47 +09:00 committed by GitHub
parent bb93ac1c83
commit 2774e976d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -47,8 +47,8 @@ const defaultOptions: GraphOptions = {
export default ((opts?: GraphOptions) => { export default ((opts?: GraphOptions) => {
function Graph() { function Graph() {
const localGraph = { ...opts?.localGraph, ...defaultOptions.localGraph } const localGraph = { ...defaultOptions.localGraph, ...opts?.localGraph, }
const globalGraph = { ...opts?.globalGraph, ...defaultOptions.globalGraph } const globalGraph = { ...defaultOptions.globalGraph, ...opts?.globalGraph, }
return ( return (
<div class="graph"> <div class="graph">
<h3>Graph View</h3> <h3>Graph View</h3>