Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/core/src/view/handler/ConnectionHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2048,7 +2048,10 @@ class ConnectionHandlerCellMarker extends CellMarker {
cell
);

if (this.connectionHandler.error && this.connectionHandler.error.length === 0) {
if (
this.connectionHandler.error !== null &&
this.connectionHandler.error.length === 0
) {
cell = null;

// Enables create target inside groups
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/view/other/Multiplicity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class Multiplicity {
* {@link source}. This implementation uses {@link checkType} on the terminal's value.
*/
checkTerminal(graph: Graph, edge: Cell, terminal: Cell): boolean {
const value = terminal.getValue();
const value = terminal?.getValue() ?? null;

return this.checkType(graph, value, this.type, this.attr, this.value);
}
Expand Down
4 changes: 3 additions & 1 deletion packages/html/stories/Validation.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
rubberBandTypes,
rubberBandValues,
} from './shared/args.js';
import { createGraphContainer } from './shared/configure.js';
import { configureImagesBasePath, createGraphContainer } from './shared/configure.js';
// style required by RubberBand
import '@maxgraph/core/css/common.css';

Expand All @@ -46,6 +46,8 @@ export default {
};

const Template = ({ label, ...args }) => {
configureImagesBasePath();

const container = createGraphContainer(args);

const xmlDocument = xmlUtils.createXmlDocument();
Expand Down