fix(core): ref access when passing default edge options
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -182,7 +182,7 @@ export default function useHandle({
|
||||
)
|
||||
|
||||
if (isValid) {
|
||||
if (!onEdgeUpdate) emits.connect({ ...defaultEdgeOptions, ...connection })
|
||||
if (!onEdgeUpdate) emits.connect({ ...(defaultEdgeOptions?.value || {}), ...connection })
|
||||
else onEdgeUpdate(connection)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -568,7 +568,7 @@ export function useActions(state: State, getters: ComputedGetters): Actions {
|
||||
if (!state.initialized) state.initialized = true
|
||||
}
|
||||
|
||||
const toObject = () => {
|
||||
const toObject: Actions['toObject'] = () => {
|
||||
// we have to stringify/parse so objects containing refs (like nodes and edges) can potentially be saved in a storage
|
||||
return JSON.parse(
|
||||
JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user