Skip to content

Commit 1e6852c

Browse files
committed
try pushing through error
1 parent 934c57d commit 1e6852c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Mdx.res

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,13 @@ let remarkReScriptPrelude = tree => {
129129
let remarkLinkPlugin = (tree, vfile) => {
130130
visit(tree, "link", node => {
131131
let url = node["url"]
132-
let filePath =
133-
vfile["history"][0]->Option.getOrThrow(
134-
~message=`File path not found for vfile: ${node["url"]}`,
135-
)
132+
let filePath = switch vfile["history"][0] {
133+
| Some(path) => path
134+
| None => {
135+
Console.error2("File path not found for vfile:", JSON.stringifyAny(node["url"]))
136+
""
137+
}
138+
}
136139

137140
// Direct links to the homepage are OK
138141
if url == "https://rescript-lang.org" {

0 commit comments

Comments
 (0)