Skip to content

Commit

Permalink
Tollerate missing documentation from node.js documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasblaesing committed Feb 18, 2022
1 parent 9ee75b4 commit 19d61b2
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,9 @@ private void addMethods(final ModelElementFactory factory, final JsObject toObje
}
}
JsObject object = factory.newFunction(scope, toObject, methodName, paramNames, NodeJsUtils.NODEJS_NAME);
object.setDocumentation(Documentation.create(doc, getDocumentationURL(methodName, paramNames)));
if(doc != null) {
object.setDocumentation(Documentation.create(doc, getDocumentationURL(methodName, paramNames)));
}
toObject.addProperty(object.getName(), object);
addProperties(factory, object, (DeclarationScope) object, method);
addMethods(factory, object, (DeclarationScope) object, method);
Expand All @@ -469,7 +471,9 @@ private JsObject createProperty(final ModelElementFactory factory, final JsObjec
JsObject object = factory.newObject(parent, propertyName, OffsetRange.NONE, true, NodeJsUtils.NODEJS_NAME);
parent.addProperty(object.getName(), object);
String doc = getJSONStringProperty(jsonObject, DESCRIPTION);
object.setDocumentation(Documentation.create(doc, getDocumentationURL(propertyName)));
if(doc != null) {
object.setDocumentation(Documentation.create(doc, getDocumentationURL(propertyName)));
}
return object;
}
return null;
Expand Down

0 comments on commit 19d61b2

Please sign in to comment.