File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
crates/runtime-config/src Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -118,14 +118,20 @@ where
118118 & self ,
119119 initial_key_values : impl IntoIterator < Item = & ( String , String ) > ,
120120 ) -> anyhow:: Result < ( ) > {
121+ // We don't want to unnecessarily interact with the default store
122+ let mut iter = initial_key_values. into_iter ( ) . peekable ( ) ;
123+ if iter. peek ( ) . is_none ( ) {
124+ return Ok ( ( ) ) ;
125+ }
126+
121127 let store = self
122128 . key_value_resolver
123129 . default ( DEFAULT_KEY_VALUE_STORE_LABEL )
124130 . expect ( "trigger was misconfigured and lacks a default store" )
125131 . get ( DEFAULT_KEY_VALUE_STORE_LABEL )
126132 . await
127133 . expect ( "trigger was misconfigured and lacks a default store" ) ;
128- for ( key, value) in initial_key_values {
134+ for ( key, value) in iter {
129135 store
130136 . set ( key, value. as_bytes ( ) )
131137 . await
You can’t perform that action at this time.
0 commit comments