Skip to content

Commit

Permalink
restore adding the debug information
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tobiasso85 committed Jul 29, 2020
1 parent 3dbcee6 commit 8540ef1
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions lib/processors/resourceListCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8540ef1

Please sign in to comment.