We have added a content editor webpart to
EditForm.aspx for document library. In the CEWP, there's a JS filed. We need to execute different code when a folder is getting edited (like renaming the folder) and when file metadata is edited.
How can we check if the currently opened item is a folder or a document in
EditForm.aspx? We can use the ID field in the URL and check using REST API or CSOM but I would like to avoid server calls for efficiency purpose.