File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ type UpdateExpressionsByKeyword = Record<UpdateActionKeyword, string>
6868export function mergeUpdateExpressions ( expression1 : string , expression2 : string ) : string {
6969 const a = splitUpdateExpressionToActionKeyword ( expression1 )
7070 const b = splitUpdateExpressionToActionKeyword ( expression2 )
71- return Array . from ( new Set ( < UpdateActionKeyword [ ] > [ ...Object . keys ( a ) , ... Object . keys ( b ) ] ) )
71+ return Array . from ( new Set ( < UpdateActionKeyword [ ] > [ ...Object . keys ( a ) , ...Object . keys ( b ) ] ) )
7272 . map ( clause => `${ clause } ` + ( ! a [ clause ] ? b [ clause ] : ! b [ clause ] ? a [ clause ] : `${ a [ clause ] } , ${ b [ clause ] } ` ) )
7373 . join ( ' ' )
7474}
@@ -85,8 +85,6 @@ function splitUpdateExpressionToActionKeyword(updateExpression: string): UpdateE
8585 . reduce ( ( u , e , i , arr ) => {
8686 if ( isUpdateActionKeyword ( e ) ) {
8787 u [ e ] = arr [ i + 1 ]
88- } else {
89- throw new Error ( `unknown action keyword ${ e } ` )
9088 }
9189
9290 return u
You can’t perform that action at this time.
0 commit comments