mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
Merge branch 'master' into update_padding
This commit is contained in:
commit
b76f29be5f
3 changed files with 2703 additions and 2705 deletions
5400
package-lock.json
generated
5400
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -76,7 +76,7 @@
|
||||||
"event-emitter": "^0.3.5",
|
"event-emitter": "^0.3.5",
|
||||||
"jszip": "^3.1.5",
|
"jszip": "^3.1.5",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
"marks-pane": "^1.0.8",
|
"marks-pane": "^1.0.9",
|
||||||
"path-webpack": "0.0.3",
|
"path-webpack": "0.0.3",
|
||||||
"stream-browserify": "^2.0.1",
|
"stream-browserify": "^2.0.1",
|
||||||
"xmldom": "^0.1.27"
|
"xmldom": "^0.1.27"
|
||||||
|
|
|
@ -303,11 +303,9 @@ class Navigation {
|
||||||
* @param {object} json the items to be loaded
|
* @param {object} json the items to be loaded
|
||||||
*/
|
*/
|
||||||
load(json) {
|
load(json) {
|
||||||
return json.map((item) => {
|
return json.map(item => {
|
||||||
item.label = item.title;
|
item.label = item.title;
|
||||||
if (item.children) {
|
item.subitems = item.children ? this.load(item.children) : [];
|
||||||
item.subitems = this.load(item.children);
|
|
||||||
}
|
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue