diff --git a/rm-server/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary-v2/rm-parse-args.lib.js b/rm-server/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary-v2/rm-parse-args.lib.js index d74964571a..8dc31d37c1 100644 --- a/rm-server/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary-v2/rm-parse-args.lib.js +++ b/rm-server/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary-v2/rm-parse-args.lib.js @@ -88,18 +88,27 @@ ParseArgs.getParsedArgs = function RecordsManagementFilter_getParsedArgs(contain if (args.filter == "unfiledRecords") { - var unfiledRecordContainer = rootNode.childrenByXPath("rma:Unfiled_x0020_Records"); - pathNode = unfiledRecordContainer.length > 0 ? unfiledRecordContainer[0] : rootNode; + var container = rootNode.childrenByXPath("rma:Unfiled_x0020_Records"); + if (container.length > 0) + { + pathNode = container[0]; + } } else if (args.filter == "holds") { var container = rootNode.childrenByXPath("rma:Holds"); - pathNode = container.length > 0 ? container[0] : rootNode; + if (container.length > 0) + { + pathNode = container[0]; + } } else if (args.filter == "transfers") { var container = rootNode.childrenByXPath("rma:Transfers"); - pathNode = container.length > 0 ? container[0] : rootNode; + if (container.length > 0) + { + pathNode = container[0]; + } } else {