@@ -92,12 +92,12 @@ export default function (_local: any, _remote: any) {
9292 // 适配钩子函数配置
9393 if ( ! ( _ . isEmpty ( local ?. instanceLifecycleConfig ) && _ . isEmpty ( remote ?. instanceLifecycleConfig ) ) ) {
9494 const { initializer, preStop } = local . instanceLifecycleConfig || { } ;
95- if ( initializer ?. handler && initializer ?. command && ! _ . isEmpty ( initializer ?. command ) ) {
95+ if ( initializer ?. handler && initializer ?. command && ! _ . isEmpty ( initializer ?. command ) ) {
9696 throw new Error (
9797 'fc3 pre check: command and handler can not be set at the same time in lifecycle Lifecycle.Initializer' ,
9898 ) ;
9999 }
100- if ( preStop ?. handler && preStop ?. command && ! _ . isEmpty ( preStop ?. command ) ) {
100+ if ( preStop ?. handler && preStop ?. command && ! _ . isEmpty ( preStop ?. command ) ) {
101101 throw new Error (
102102 'fc3 pre check: command and handler can not be set at the same time in lifecycle Lifecycle.PreStop' ,
103103 ) ;
@@ -109,7 +109,11 @@ export default function (_local: any, _remote: any) {
109109 remote ?. instanceLifecycleConfig ?. initializer ?. timeout
110110 ) {
111111 if ( initializer ?. handler || ( initializer ?. command && ! _ . isEmpty ( initializer . command ) ) ) {
112- if ( remote ?. instanceLifecycleConfig ?. initializer ?. handler && ( initializer ?. command && ! _ . isEmpty ( initializer . command ) ) ) {
112+ if (
113+ remote ?. instanceLifecycleConfig ?. initializer ?. handler &&
114+ initializer ?. command &&
115+ ! _ . isEmpty ( initializer . command )
116+ ) {
113117 _ . set ( local , 'instanceLifecycleConfig.initializer.handler' , '' ) ;
114118 }
115119 if ( remote ?. instanceLifecycleConfig ?. initializer ?. command && initializer ?. handler ) {
@@ -134,7 +138,11 @@ export default function (_local: any, _remote: any) {
134138 remote ?. instanceLifecycleConfig ?. preStop ?. timeout
135139 ) {
136140 if ( preStop ?. handler || ( preStop ?. command && ! _ . isEmpty ( preStop . command ) ) ) {
137- if ( remote ?. instanceLifecycleConfig ?. preStop ?. handler && ( preStop ?. command && ! _ . isEmpty ( preStop . command ) ) ) {
141+ if (
142+ remote ?. instanceLifecycleConfig ?. preStop ?. handler &&
143+ preStop ?. command &&
144+ ! _ . isEmpty ( preStop . command )
145+ ) {
138146 _ . set ( local , 'instanceLifecycleConfig.preStop.handler' , '' ) ;
139147 }
140148 if ( remote ?. instanceLifecycleConfig ?. preStop ?. command && preStop ?. handler ) {
0 commit comments