Lint fixes

This commit is contained in:
Knut Sveidqvist
2020-06-06 12:53:19 +02:00
parent 85a8feec9d
commit db3377e170
5 changed files with 61 additions and 46 deletions

View File

@@ -268,8 +268,13 @@ export const getClasses = function(text) {
const parser = flow.parser;
parser.yy = flowDb;
// Parse the graph definition
parser.parse(text);
try {
// Parse the graph definition
parser.parse(text);
} catch (e) {
return;
}
return flowDb.getClasses();
};
@@ -278,6 +283,7 @@ export const getClasses = function(text) {
* @param text
* @param id
*/
export const draw = function(text, id) {
logger.info('Drawing flowchart');
flowDb.clear();
@@ -286,9 +292,9 @@ export const draw = function(text, id) {
// Parse the graph definition
// try {
parser.parse(text);
parser.parse(text);
// } catch (err) {
// logger.debug('Parsing failed');
// logger.debug('Parsing failed');
// }
// Fetch the default direction, use TD if none was found