Skip to content

Commit 8338508

Browse files
committed
fix(scf): layer config bug
1 parent 7213658 commit 8338508

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/baas/scf/index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,10 @@ class Scf {
7676
functionConfigure['EipConfig.EipFixed'] = 'TRUE'
7777
}
7878
if (inputs.layers) {
79-
let index = 0
80-
for (const item in inputs.layers) {
81-
functionConfigure[`Layers.${index}.LayerName`] = item
82-
functionConfigure[`Layers.${index}.LayerVersion`] = inputs.layers[item]
83-
index++
84-
}
79+
inputs.layers.forEach((item, index) => {
80+
functionConfigure[`Layers.${index}.LayerName`] = item.name
81+
functionConfigure[`Layers.${index}.LayerVersion`] = item.version
82+
})
8583
}
8684
if (inputs.deadLetter) {
8785
if (inputs.deadLetter.type) {

0 commit comments

Comments
 (0)