mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 06:19:24 +02:00
Fix for broken test
This commit is contained in:
@@ -372,11 +372,11 @@ const buildLegacyDisplay = function (text) {
|
||||
|
||||
const parameters = text.substring(methodStart + 1, methodEnd);
|
||||
const classifier = text.substring(methodEnd + 1, 1);
|
||||
cssStyle = parseClassifier(classifier);
|
||||
cssStyle = parseClassifier(text.substring(methodEnd + 1, methodEnd + 2));
|
||||
|
||||
displayText = visibility + methodName + '(' + parseGenericTypes(parameters.trim()) + ')';
|
||||
|
||||
if (methodEnd < memberText.length) {
|
||||
if (methodEnd < text.length) {
|
||||
returnType = text.substring(methodEnd + 2).trim();
|
||||
if (returnType !== '') {
|
||||
returnType = ' : ' + parseGenericTypes(returnType);
|
||||
|
@@ -217,10 +217,12 @@ const getStartDate = function (prevTime, dateFormat, str) {
|
||||
} else {
|
||||
log.debug('Invalid date:' + str);
|
||||
log.debug('With date format:' + dateFormat.trim());
|
||||
const d = new Date(str);
|
||||
if (typeof d === 'undefined' || isNaN(d.getTime())) {
|
||||
throw new Error('Invalid date:' + str);
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
// Default date - now
|
||||
return new Date();
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user