You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You cannot navigate into a directory that is not handled by fancyindex. The error is caused by history.js:
var elements = div.getElementsByClassName('box-content')[0];
target.innerHTML = elements.innerHTML;
The html of "div" is the content of the directory listing. But this listing may not be generated by fancyindex, so that "elements" is null, and accessing the property innerHTML will trigger an exception.
I fixed that by setting the location and returning false in case "elements" is null.
A somewhat better approach would be to let fancyindex send a custom header and check that header instead of relying on the presence of an element with the class name 'box-content". And the best fix would be to not fire the ajax request at all if a link points to a location that is not handled by fancyindex.
The text was updated successfully, but these errors were encountered:
I mistakenly reported this issue as a bug of ngx-fancyindex before (aperezdc/ngx-fancyindex#21):
You cannot navigate into a directory that is not handled by fancyindex. The error is caused by history.js:
var elements = div.getElementsByClassName('box-content')[0];
target.innerHTML = elements.innerHTML;
The html of "div" is the content of the directory listing. But this listing may not be generated by fancyindex, so that "elements" is null, and accessing the property innerHTML will trigger an exception.
I fixed that by setting the location and returning false in case "elements" is null.
A somewhat better approach would be to let fancyindex send a custom header and check that header instead of relying on the presence of an element with the class name 'box-content". And the best fix would be to not fire the ajax request at all if a link points to a location that is not handled by fancyindex.
The text was updated successfully, but these errors were encountered: