Skip to content

Commit eeacb8a

Browse files
committed
fix: fix astnode for ObjectMethod
1 parent 5711c23 commit eeacb8a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/jsdoc/src/astnode.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ var nodeToValue = exports.nodeToValue = function(node) {
263263
str += nodeToValue(node.key);
264264
}
265265
break;
266-
267266
case Syntax.ObjectExpression:
268267
tempObject = {};
269268
node.properties.forEach(function(prop) {
@@ -274,9 +273,9 @@ var nodeToValue = exports.nodeToValue = function(node) {
274273
}
275274

276275
key = prop.key.name;
277-
278-
// preserve literal values so that the JSON form shows the correct type
279-
if (prop.value.type === Syntax.Literal) {
276+
if (prop.type === 'ObjectMethod') {
277+
tempObject[key] = '() => void';
278+
} else if (prop.value.type === Syntax.Literal) {
280279
tempObject[key] = prop.value.value;
281280
}
282281
else {

0 commit comments

Comments
 (0)