remove use of spread for node 4 support

This commit is contained in:
Daniel Schep 2018-11-28 09:52:31 -05:00
parent 577f85d070
commit b35d37f896

View File

@ -82,7 +82,7 @@ module.exports = {
this.serverless.cli.log('Uploading artifacts...');
const functionNames = this.serverless.service.getAllFunctions();
const artifactFilePaths = _.uniq(
let artifactFilePaths = _.uniq(
_.map(functionNames, (name) => {
const functionArtifactFileName = this.provider.naming.getFunctionArtifactName(name);
const functionObject = this.serverless.service.getFunction(name);
@ -104,7 +104,7 @@ module.exports = {
);
const layerNames = this.serverless.service.getAllLayers();
artifactFilePaths.push(..._.map(layerNames, (name) => {
artifactFilePaths = artifactFilePaths.concat(_.map(layerNames, (name) => {
const layerObject = this.serverless.service.getLayer(name);
if (layerObject.package && layerObject.package.artifact) {