File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,14 @@ public function execute(Observer $observer)
2626 {
2727
2828 $ storeId = $ this ->storeManager ->getStore ()->getStoreId ();
29+ $ configuration = $ observer ->getData ('configuration ' );
2930
30- return array_replace (
31- ( array ) $ observer -> getData ( ' configuration ' ),
32- [
33- ' debounce_amount ' => $ this -> config -> getDebounceMilliseconds ( $ storeId ),
34- ' minimum_characters ' => $ this ->config ->getMinimumCharacters ($ storeId )
35- ]
36- );
31+ if ( $ this -> config -> getDebounceMilliseconds ( $ storeId )) {
32+ $ configuration [ ' debounce_amount ' ] = $ this -> config -> getDebounceMilliseconds ( $ storeId );
33+ }
34+
35+ if ( $ this ->config ->getMinimumCharacters ($ storeId )) {
36+ $ configuration [ ' minimum_characters ' ] = $ this -> config -> getMinimumCharacters ( $ storeId );
37+ }
3738 }
3839}
You can’t perform that action at this time.
0 commit comments