OR term in WHERE clause crashes Search Kit
Search Kit can no longer save or load a search which contains an "OR" term in the WHERE clause.
Upon loading such a saved search, the WHERE clause is displayed as empty, and the following console error is observed:
angular.js:15697 TypeError: Cannot read property 'indexOf' of undefined
at controller.operatorTakesInput (angular-modules.c4138be7c73c1c03a09face30217fa38.js?qw2iyi:2135)
at fn (eval at compile (angular.js:16548), <anonymous>:4:337)
at m.$digest (angular.js:19262)
at angular.js:19562
at Yg.completeTask (angular.js:21403)
at angular.js:6879
To reproduce:
- Search | Search Kit | New Search
- Where | OR
- Add any term into the OR clause, e.g.: Contact ID = 1
- Save
- Observe that:
- The term previously specified in the OR clause has been deleted.
- Numerous errors are displayed in the console.
Observed on CiviCRM 5.39.0 and 5.41 alpha1.
Problem did not occur in 5.38.0.