Commit 60678f5baf

Loris Cro <kappaloris@gmail.com>
2022-09-11 23:45:18
autodoc: fix regression in frontend rendering of values
1 parent 2a96f80
Changed files (1)
lib
docs
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);
     }