Skip to content

Commit 3ead811

Browse files
committed
fix(scf): unbind on layer need to add empty layer config
1 parent 532faa5 commit 3ead811

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/modules/scf/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,14 @@ class Scf {
163163
delete functionInputs.Handler;
164164
delete functionInputs.Code;
165165
delete functionInputs.CodeSource;
166+
// handle unbind one layer
167+
// this is a very strange logical for layer unbind, but backend api need me to do this.
168+
if (functionInputs.Layers && functionInputs.Layers.length === 0) {
169+
functionInputs.Layers.push({
170+
LayerName: '',
171+
LayerVersion: 0,
172+
});
173+
}
166174
await this.request(functionInputs);
167175
return true;
168176
}

0 commit comments

Comments
 (0)