1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-03 14:59:18 +02:00

Merge branch 'master' into update_padding

This commit is contained in:
Fred Chasen 2018-07-20 16:26:07 -07:00
commit b76f29be5f
3 changed files with 2703 additions and 2705 deletions

5400
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -76,7 +76,7 @@
"event-emitter": "^0.3.5",
"jszip": "^3.1.5",
"lodash": "^4.17.4",
"marks-pane": "^1.0.8",
"marks-pane": "^1.0.9",
"path-webpack": "0.0.3",
"stream-browserify": "^2.0.1",
"xmldom": "^0.1.27"

View file

@ -303,11 +303,9 @@ class Navigation {
* @param {object} json the items to be loaded
*/
load(json) {
return json.map((item) => {
return json.map(item => {
item.label = item.title;
if (item.children) {
item.subitems = this.load(item.children);
}
item.subitems = item.children ? this.load(item.children) : [];
return item;
});
}