1
0
Fork 0
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:
Fred Chasen 2017-08-28 11:05:09 -04:00
parent 576a5b81dc
commit cc0110a58c
3 changed files with 14 additions and 10 deletions

View file

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