File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
libs/backend-apisix-standalone/src Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -28,14 +28,18 @@ export const toADC = (input: typing.APISIXStandalone) => {
2828 pass_host : upstream . pass_host ,
2929 upstream_host : upstream . upstream_host ,
3030
31- // Empty Lua tables will be encoded as "{}" rather than "[]" by cjson,
32- // so this must be handled separately to prevent unexpected diff results.
33- nodes : ! isEmpty ( upstream . nodes ) ? upstream . nodes : [ ] ,
34-
3531 checks : upstream . checks ,
3632 discovery_type : upstream . discovery_type ,
3733 service_name : upstream . service_name ,
3834 discovery_args : upstream . discovery_args ,
35+
36+ ...( upstream . nodes
37+ ? {
38+ // Empty Lua tables will be encoded as "{}" rather than "[]" by cjson,
39+ // so this must be handled separately to prevent unexpected diff results.
40+ nodes : ! isEmpty ( upstream . nodes ) ? upstream . nodes : [ ] ,
41+ }
42+ : { } ) ,
3943 } ) ;
4044 return {
4145 services :
You can’t perform that action at this time.
0 commit comments