Only log valid diagrams

This commit is contained in:
Sidharth Vinod
2022-09-15 12:11:49 +05:30
parent 1b1ed01156
commit 3bef3ba7fd
2 changed files with 5 additions and 1 deletions

View File

@@ -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']
}
};

View File

@@ -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 });
};