From 8540ef1de864d56323bae4695bf5aaaaace5d5a6 Mon Sep 17 00:00:00 2001 From: Tobias Sorn Date: Thu, 16 Jul 2020 07:34:46 +0200 Subject: [PATCH] restore adding the debug information the original and the debug resources should be the same. This was changed because sap-ui-core-dbg.js is not the same as its source sap-ui-core.js. sap-ui-core-dbg.js is a bundle and not the corresponding debug file of sap-ui-core.js --- lib/processors/resourceListCreator.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/processors/resourceListCreator.js b/lib/processors/resourceListCreator.js index 3172d99b2..d01eb2182 100644 --- a/lib/processors/resourceListCreator.js +++ b/lib/processors/resourceListCreator.js @@ -217,17 +217,20 @@ class ResourcesList { // search for a resource with the same name let myInfo = this.resourcesByName.get(relativeName); + if ( myInfo == null ) { + // when not found, check if the given resource is a debug resource and share the information with the non-dbg version + const nondbg = ResourcesList.getNonDebugName(relativeName); + if ( nondbg != null && this.resourcesByName.has(nondbg) ) { + myInfo = new ResourceInfo(relativeName); + myInfo.copyFrom(this.name, this.resourcesByName.get(nondbg)); + this.resources.push(myInfo); + this.resourcesByName.set(relativeName, myInfo); + } + } + // this is the assumption, that the debug one is the same as the non-dbg one if ( myInfo == null ) { myInfo = new ResourceInfo(relativeName); - const nonDebugName = ResourcesList.getNonDebugName(relativeName); - // when not found, check if the given resource is a debug resource and - // share the information with the non-dbg version - if ( nonDebugName != null && this.resourcesByName.has(nonDebugName)) { - const nonDbgResource = this.resourcesByName.get(nonDebugName); - myInfo.module = nonDbgResource.module; - myInfo.format = nonDbgResource.format; - } myInfo.size = info.size; this.resources.push(myInfo); this.resourcesByName.set(relativeName, myInfo);