fix build failure

This commit is contained in:
Mathieu David 2017-06-04 20:47:34 +02:00
parent 1a8e54bb52
commit f1121cf8c2
1 changed files with 4 additions and 1 deletions

View File

@ -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