From c28f34af047790e442e400e67bde079d80dc655e Mon Sep 17 00:00:00 2001
From: Sergey Linev <S.Linev@gsi.de>
Date: Tue, 19 Nov 2019 12:59:39 +0100
Subject: [PATCH] [rbrowser] do not use row._bHasChildren field

It is not documented field, which can be changed at any time.
While item property includes required information - use it
---
 ui5/browser/controller/Browser.controller.js | 3 ++-
 ui5/browser/model/BrowserModel.js            | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/ui5/browser/controller/Browser.controller.js b/ui5/browser/controller/Browser.controller.js
index b502463ef07..d955a679d72 100644
--- a/ui5/browser/controller/Browser.controller.js
+++ b/ui5/browser/controller/Browser.controller.js
@@ -743,7 +743,8 @@ sap.ui.define(['sap/ui/core/mvc/Controller',
 
          if (!fullpath) return;
 
-         if (row._bHasChildren) {
+         // do not use row._bHasChildren while it is not documented member of m.Row object
+         if (!prop.isLeaf) {
             if (!prop.fullpath.endsWith(".root/")) {
 
                let oBreadcrumbs = this.getView().byId("breadcrumbs");
diff --git a/ui5/browser/model/BrowserModel.js b/ui5/browser/model/BrowserModel.js
index 450799f97d3..2b6bb25fdb9 100644
--- a/ui5/browser/model/BrowserModel.js
+++ b/ui5/browser/model/BrowserModel.js
@@ -348,9 +348,9 @@ sap.ui.define([
                     fullpath: path,
                     index: id,
                     _elem: elem,
+                    isLeaf: !elem.nchilds,
                     // these are required by list binding, should be eliminated in the future
                     type: elem.nchilds ? "folder" : "file",
-                    isLeaf: !elem.nchilds,
                     level: lvl,
                     context: pthis.getContext("/nodes/" + id),
                     nodeState: {
-- 
GitLab