Skip to content

Commit

Permalink
[INTERNAL] minifier: Adopt default param handling
Browse files Browse the repository at this point in the history
  • Loading branch information
matz3 committed Mar 10, 2022
1 parent a3bcc5b commit 267fafc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/processors/minifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ const debugFileRegex = /((?:\.view|\.fragment|\.controller|\.designtime|\.suppor
* @returns {Promise<module:@ui5/builder.processors.MinifierResult[]>}
* Promise resolving with object of resource, dbgResource and sourceMap
*/
module.exports = async function({resources, options: {addSourceMappingUrl} = {}}) {
if (addSourceMappingUrl === undefined) {
addSourceMappingUrl = true;
}
module.exports = async function({resources, options: {addSourceMappingUrl = true} = {}}) {
return Promise.all(resources.map(async (resource) => {
const dbgPath = resource.getPath().replace(debugFileRegex, "-dbg$1");
const dbgResource = await resource.clone();
Expand Down

0 comments on commit 267fafc

Please sign in to comment.