Skip to content

Commit

Permalink
Merge pull request #4562 from lishid/patch-3
Browse files Browse the repository at this point in the history
Fix flowchart tooltip typing bug
  • Loading branch information
sidharthv96 authored Jul 6, 2023
2 parents e80e281 + 12fe6ff commit 1a4e5d9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/mermaid/src/diagrams/flowchart/flowDb.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,10 @@ export const setLink = function (ids, linkStr, target) {
setClass(ids, 'clickable');
};
export const getTooltip = function (id) {
return tooltips[id];
if (tooltips.hasOwnProperty(id)) {
return tooltips[id];
}
return undefined;
};

/**
Expand Down Expand Up @@ -443,7 +446,7 @@ export const clear = function (ver = 'gen-1') {
subGraphs = [];
subGraphLookup = {};
subCount = 0;
tooltips = [];
tooltips = {};
firstGraphFlag = true;
version = ver;
commonClear();
Expand Down

0 comments on commit 1a4e5d9

Please sign in to comment.