fix: vertex property props is overwritten instead of being merged with new value

Fixes #3263
This commit is contained in:
Michael Maier 2022-10-10 17:59:29 +02:00
parent 8ffa7e6334
commit 7e8631dd19

View File

@ -119,7 +119,11 @@ export const addVertex = function (_id, text, type, style, classes, dir, props =
if (typeof dir !== 'undefined') {
vertices[id].dir = dir;
}
vertices[id].props = props;
if (typeof vertices[id].props === 'undefined') {
vertices[id].props = props;
} else if (typeof props !== 'undefined') {
Object.assign(vertices[id].props, props);
}
};
/**