os-js / osjs-filemanager-application

OS.js File Manager Application

Home Page:https://manual.os-js.org/v3/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Edit button errors out when sidebar folder selected

ajmeese7 opened this issue · comments

main folder selected

If I were to click the edit button right now, the console errors out with Cannot read properties of undefined (reading 'path').

There are several different avenues of approach that we could use for this, so I wanted to open this issue to discuss it before I just picked one. Here are a few possible routes, I'm sure there are more that I am forgetting:

  1. Disable the edit button if only a sidebar item is selected
  2. Have a fallback for if the object is undefined, and try to get the mountpoint reference (i.e. home:/) from the sidebar. This would ideally treat the sidebar items as normal directories