commit 60678f5bafdf22e274229f983d02069e13996426 (tree) parent 2a96f80d03c70546e5166e7752ee2b4b64c7cc5f Author: Loris Cro <kappaloris@gmail.com> Date: Sun, 11 Sep 2022 23:45:18 +0200 autodoc: fix regression in frontend rendering of values Diffstat:
| M | lib/docs/main.js | | | 10 | ++++++---- |
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/docs/main.js b/lib/docs/main.js @@ -478,11 +478,13 @@ var zigAnalysis; } if (lastIsDecl && last.kind === "const") { - let typeObj = getType(resolveValue(last.value).expr.type); - if (typeObj && typeObj.kind === typeKinds.Fn) { - return renderFn(last); + const value = resolveValue(last.value); + if ("type" in value.expr) { + let typeObj = getType(value.expr.type); + if (typeObj.kind === typeKinds.Fn) { + return renderFn(last); + } } - return renderValue(last); }