mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-05 15:32:55 +02:00
Guard against empty contents
This commit is contained in:
parent
576a5b81dc
commit
cc0110a58c
3 changed files with 14 additions and 10 deletions
|
@ -757,7 +757,10 @@ class DefaultViewManager {
|
|||
getContents(){
|
||||
var contents = [];
|
||||
this.views.each(function(view){
|
||||
contents.push(view.contents);
|
||||
const viewContents = view.contents;
|
||||
if (viewContents) {
|
||||
contents.push(viewContents);
|
||||
}
|
||||
});
|
||||
return contents;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue