Skip to content

Commit

Permalink
[INTERNAL] Fix embeddedBy check
Browse files Browse the repository at this point in the history
  • Loading branch information
matz3 committed Nov 30, 2020
1 parent 7c8573a commit 75377ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/processors/manifestCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ async function createManifest(libraryResource, libBundle, descriptorVersion, _in
return false;
}
let embeddedBy;
if (manifest && manifest["sap.app"] && typeof manifest["sap.app"]["embeddedBy"] !== "undefined") {
if (manifest && manifest["sap.app"]) {
embeddedBy = manifest["sap.app"]["embeddedBy"];
}
if (embeddedBy == null) {
if (typeof embeddedBy === "undefined") {
log.verbose(" component doesn't declare 'sap.app/embeddedBy', don't list it as 'embedded'");
return false;
}
Expand Down
4 changes: 1 addition & 3 deletions test/lib/processors/manifestCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,7 @@ test.serial("manifest creation with embedded component (Missing 'embeddedBy')",
return "/resources/sap/lib1/component1/manifest.json";
},
getString: async () => {
return JSON.stringify({
"sap.app": {}
});
return JSON.stringify({});
}
};

Expand Down

0 comments on commit 75377ac

Please sign in to comment.