- Timestamp:
- 11/25/21 22:08:24 (3 years ago)
- Branches:
- master
- Children:
- 8d391a1
- Parents:
- 59329aa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/node_modules/@angular/compiler-cli/ngcc/src/rendering/umd_rendering_formatter.js
r59329aa re29cc2e 56 56 return; 57 57 } 58 var wrapperF unction = umdModule.wrapperFn;58 var wrapperFn = umdModule.wrapperFn, factoryFn = umdModule.factoryFn; 59 59 // We need to add new `require()` calls for each import in the CommonJS initializer 60 renderCommonJsDependencies(output, wrapperF unction, imports);61 renderAmdDependencies(output, wrapperF unction, imports);62 renderGlobalDependencies(output, wrapperF unction, imports);63 renderFactoryParameters(output, wrapperFunction, imports);60 renderCommonJsDependencies(output, wrapperFn, imports); 61 renderAmdDependencies(output, wrapperFn, imports); 62 renderGlobalDependencies(output, wrapperFn, imports); 63 renderFactoryParameters(output, factoryFn, imports); 64 64 }; 65 65 /** … … 197 197 * Add dependency parameters to the UMD factory function. 198 198 */ 199 function renderFactoryParameters(output, wrapperFunction, imports) { 200 var wrapperCall = wrapperFunction.parent; 201 var secondArgument = wrapperCall.arguments[1]; 202 if (!secondArgument) { 203 return; 204 } 205 // Be resilient to the factory being inside parentheses 206 var factoryFunction = ts.isParenthesizedExpression(secondArgument) ? secondArgument.expression : secondArgument; 207 if (!ts.isFunctionExpression(factoryFunction)) { 208 return; 209 } 199 function renderFactoryParameters(output, factoryFunction, imports) { 210 200 var parameters = factoryFunction.parameters; 211 201 var parameterString = imports.map(function (i) { return i.qualifier.text; }).join(','); … … 324 314 } 325 315 }); 326 //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW1kX3JlbmRlcmluZ19mb3JtYXR0ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jb21waWxlci1jbGkvbmdjYy9zcmMvcmVuZGVyaW5nL3VtZ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