File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
schemaregistry/rules/encryption Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -93,18 +93,20 @@ export class FieldEncryptionExecutor extends FieldRuleExecutor {
93
93
}
94
94
95
95
if ( this . config != null ) {
96
- for ( let [ key , value ] of config ) {
97
- let v = this . config . get ( key )
98
- if ( v != null ) {
99
- if ( v !== value ) {
100
- throw new RuleError ( 'rule config key already set: {key}' )
96
+ if ( config != null ) {
97
+ for ( let [ key , value ] of config ) {
98
+ let v = this . config . get ( key )
99
+ if ( v != null ) {
100
+ if ( v !== value ) {
101
+ throw new RuleError ( 'rule config key already set: {key}' )
102
+ }
103
+ } else {
104
+ this . config . set ( key , value )
101
105
}
102
- } else {
103
- this . config . set ( key , value )
104
106
}
105
107
}
106
108
} else {
107
- this . config = config
109
+ this . config = config != null ? config : new Map < string , string > ( )
108
110
}
109
111
}
110
112
You can’t perform that action at this time.
0 commit comments