mirror of
https://github.com/mermaid-js/mermaid-live-editor.git
synced 2025-03-18 17:16:21 +03:00
Only log valid diagrams
This commit is contained in:
@@ -44,6 +44,7 @@ module.exports = {
|
||||
],
|
||||
'@typescript-eslint/no-unsafe-member-access': 'off',
|
||||
'@typescript-eslint/no-unsafe-assignment': 'off',
|
||||
'es/no-regexp-lookbehind-assertions': 'error'
|
||||
'es/no-regexp-lookbehind-assertions': 'error',
|
||||
curly: ['error', 'all']
|
||||
}
|
||||
};
|
||||
|
||||
@@ -54,6 +54,9 @@ export const countLines = (code: string): number => {
|
||||
|
||||
export const saveStatistics = (graph: string): void => {
|
||||
const graphType = detectType(graph);
|
||||
if (!graphType) {
|
||||
return;
|
||||
}
|
||||
const length = countLines(graph);
|
||||
logEvent('render', { graphType, length });
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user