Skip to content

Commit cecc15d

Browse files
authored
Fix: Error opening files from the system file explorer
1 parent f06f7f6 commit cecc15d

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## v1.5.1 (dd-mm-yyyy)
8+
9+
##### 🐛 Bug Fixes
10+
11+
- Error opening files from the system file explorer
12+
713
## [v1.5.0](https://github.com/ollm/OpenComic/releases/tag/v1.5.0) (19-06-2025)
814

915
##### 🚀 New Features

scripts/dom.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ async function loadIndexPage(animation = true, path = false, content = false, ke
704704
if(_indexLabel.server)
705705
{
706706
const root = history.root();
707-
selectMenuItem(dom.labels.menuItemSelector(root.indexLabel.has ? root.indexLabel : _indexLabel));
707+
selectMenuItem(dom.labels.menuItemSelector(root.indexLabel?.has ? root.indexLabel : _indexLabel));
708708

709709
handlebarsContext.animationDelay = 0.2;
710710
template.loadContentRight('index.content.right.loading.html', animation, keepScroll);
@@ -1026,7 +1026,7 @@ async function loadIndexPage(animation = true, path = false, content = false, ke
10261026

10271027
const root = history.root();
10281028

1029-
if(!_indexLabel.has && !root.indexLabel.has)
1029+
if(!_indexLabel.has && !root.indexLabel?.has)
10301030
{
10311031
if(!root.recentlyOpened)
10321032
selectMenuItem('library');
@@ -1289,7 +1289,7 @@ function headerPath(path, mainPath, windowTitle = false)
12891289

12901290
const root = history.root();
12911291

1292-
if(config.showLibraryPath && (isFromLibrary || root.indexLabel.has || root.recentlyOpened))
1292+
if(config.showLibraryPath && (isFromLibrary || root.indexLabel?.has || root.recentlyOpened))
12931293
path.unshift({name: labels.getName(root.indexLabel, root.recentlyOpened), path: '', mainPath: ''});
12941294

12951295
let len = path.length;
@@ -1568,7 +1568,7 @@ function goStartPath()
15681568
{
15691569
const root = history.root();
15701570

1571-
if(root.indexLabel.has && !root.recentlyOpened)
1571+
if(root.indexLabel?.has && !root.recentlyOpened)
15721572
indexLabel = root.indexLabel;
15731573

15741574
if(root.recentlyOpened)

scripts/dom/history.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var history = [],
22
forwardHistory = [],
33
current = false
4-
root = false;
4+
root = {};
55

66
function add(page = {}, _clean = false)
77
{

0 commit comments

Comments
 (0)