Skip to content

Commit

Permalink
chore: Fix bindFunctions type
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Nov 27, 2023
1 parent e7f7b6a commit aff69e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/mermaid/src/diagrams/flowchart/flowDb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let direction: string;
let version: string; // As in graph

// Functions to be run after graph rendering
let funs: ((element: HTMLElement) => void)[] = [];
let funs: ((element: Element) => void)[] = [];

const sanitizeText = (txt: string) => common.sanitizeText(txt, config);

Expand Down Expand Up @@ -362,7 +362,7 @@ export const setClickEvent = function (ids: string, functionName: string, functi
setClass(ids, 'clickable');
};

export const bindFunctions = function (element: HTMLElement) {
export const bindFunctions = function (element: Element) {
funs.forEach(function (fun) {
fun(element);
});
Expand Down Expand Up @@ -394,7 +394,7 @@ export const getClasses = function () {
return classes;
};

const setupToolTips = function (element: HTMLElement) {
const setupToolTips = function (element: Element) {
let tooltipElem = select('.mermaidTooltip');
// @ts-ignore TODO: fix this
if ((tooltipElem._groups || tooltipElem)[0][0] === null) {
Expand Down

0 comments on commit aff69e5

Please sign in to comment.