Specifically, skip drawfolders iteration if parent node cannot be
found and eport invalid parent folder in the browser console.
For example, if a user creates a template folder that is not shared
that has a child folder that _is_ shared, another user at the library
that the folder is shared with would see their report folders be
incompletely rendered.
Signed-off-by: Llewellyn Marshall <llewellyn.marshall@ncdcr.gov>
Signed-off-by: blake <blake@mobiusconsortium.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
id = node.treeId;
if( folder.parent() ) {
var pnode = this.findNode(type, folder.parent());
- pid = pnode.treeId;
+ if(!pnode){
+ console.error("An error occurred retrieving "+type+" folder #"+folder.parent());
+ continue;
+ }
+ pid = pnode.treeId;
node.depth = pnode.depth + 1;
} else {
node.depth = 0;