Properly handle songs with only English title

This commit is contained in:
Elnu 2023-07-01 12:40:13 -07:00
parent a33a05a60a
commit 86f81ccc35
2 changed files with 4 additions and 1 deletions

View file

@ -16,6 +16,9 @@ pub fn furigana_to_html(text: &str) -> String {
}
pub fn furigana_filter(value: &Value, _args: &HashMap<String, Value>) -> tera::Result<Value> {
if value.is_null() {
return Ok(Value::String("".to_string()));
}
Ok(Value::String(furigana_to_html(value.as_str().expect("The furigana input must be a string"))))
}