Skip to content

Commit

Permalink
fix clinks undefined introduced with 3d054ec
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Deubler <tim.deubler@here.com>
  • Loading branch information
TerminalTim committed Oct 17, 2024
1 parent 3d054ec commit f904820
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/editor/src/IEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export default class InternalEditor {
} else if (style == 'default') {
// __default is used to preserve previously applied custom styles that may have been "overwritten"
// when the editor itself applies custom styles.
style = (layer._getCustomStyleGroup(feature) as StyleGroup & {__default?: StyleGroup}).__default || UNDEF;
style = (layer._getCustomStyleGroup(feature) as StyleGroup & {__default?: StyleGroup})?.__default || UNDEF;
}
// @ts-ignore: merge attribute is "internal"
layer.setStyleGroup(feature, style, merge);
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/features/link/NavlinkShape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ function onMouseUpShape(ev) {
}

const setConnectedLinksDefault = (shapePnt) => {
getPrivate(shapePnt).cLinks.forEach((cl) => {
getPrivate(shapePnt).cLinks?.forEach((cl) => {
linkTools.defaults(cl.link, null, true);
});
};
Expand Down

0 comments on commit f904820

Please sign in to comment.