Merge pull request #1145 from Rosto75/master
Add a case for an empty `book_title` parameter
This commit is contained in:
commit
d6cfa21fff
|
@ -61,7 +61,11 @@ impl HtmlHandlebars {
|
||||||
.get("book_title")
|
.get("book_title")
|
||||||
.and_then(serde_json::Value::as_str)
|
.and_then(serde_json::Value::as_str)
|
||||||
.unwrap_or("");
|
.unwrap_or("");
|
||||||
title = ch.name.clone() + " - " + book_title;
|
|
||||||
|
title = match book_title {
|
||||||
|
"" => ch.name.clone(),
|
||||||
|
_ => ch.name.clone() + " - " + book_title,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.data.insert("path".to_owned(), json!(path));
|
ctx.data.insert("path".to_owned(), json!(path));
|
||||||
|
|
Loading…
Reference in New Issue