mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-14 14:52:37 +00:00
fix build failure
This commit is contained in:
parent
1a8e54bb52
commit
f1121cf8c2
1 changed files with 4 additions and 1 deletions
|
@ -358,7 +358,10 @@ fn trigger_on_change<F>(book: &mut MDBook, closure: F) -> ()
|
|||
};
|
||||
|
||||
// Add the theme directory to the watcher
|
||||
watcher.watch(book.get_theme_path(), Recursive).unwrap_or_default();
|
||||
if let Some(t) = book.get_theme_path() {
|
||||
watcher.watch(t, Recursive).unwrap_or_default();
|
||||
}
|
||||
|
||||
|
||||
// Add the book.{json,toml} file to the watcher if it exists, because it's not
|
||||
// located in the source directory
|
||||
|
|
Loading…
Reference in a new issue