@@ -54,9 +54,9 @@ const SUPPORTED_FIELDS = [
54
54
unsupportedOperators : [ 'greater_than' , 'gte' , 'less_than' , 'lte' ] ,
55
55
} ,
56
56
] ;
57
+ const isPro = window . feedzyData . isPro ;
57
58
58
59
const ConditionsControl = ( { conditions, setConditions } ) => {
59
- const isPro = window . feedzyData . isPro ;
60
60
const onChangeMatch = ( value ) => {
61
61
setConditions ( {
62
62
...conditions ,
@@ -88,11 +88,7 @@ const ConditionsControl = ({ conditions, setConditions }) => {
88
88
} ) ;
89
89
} ;
90
90
91
- const onChangeCondtion = ( index , value , key ) => {
92
- if ( ! isPro ) {
93
- return ;
94
- }
95
-
91
+ const onChangeCondition = ( index , value , key ) => {
96
92
const conditionsCopy = [ ...conditions . conditions ] ;
97
93
98
94
conditionsCopy [ index ] [ key ] = value ;
@@ -130,10 +126,7 @@ const ConditionsControl = ({ conditions, setConditions }) => {
130
126
value = { conditions . match }
131
127
options = { [
132
128
{
133
- label : __ (
134
- 'All conditions are met' ,
135
- 'feedzy-rss-feeds'
136
- ) ,
129
+ label : __ ( 'All conditions are met' , 'feedzy-rss-feeds' ) ,
137
130
value : 'all' ,
138
131
} ,
139
132
{
@@ -165,7 +158,7 @@ const ConditionsControl = ({ conditions, setConditions }) => {
165
158
value = { condition ?. field }
166
159
options = { SUPPORTED_FIELDS }
167
160
onChange = { ( value ) =>
168
- onChangeCondtion ( index , value , 'field' )
161
+ onChangeCondition ( index , value , 'field' )
169
162
}
170
163
disabled = { ! isPro }
171
164
/>
@@ -190,7 +183,7 @@ const ConditionsControl = ({ conditions, setConditions }) => {
190
183
}
191
184
value = { condition ?. operator }
192
185
onChange = { ( value ) =>
193
- onChangeCondtion ( index , value , 'operator' )
186
+ onChangeCondition ( index , value , 'operator' )
194
187
}
195
188
disabled = { ! isPro }
196
189
/>
@@ -205,7 +198,7 @@ const ConditionsControl = ({ conditions, setConditions }) => {
205
198
label = { __ ( 'Value' , 'feedzy-rss-feeds' ) }
206
199
value = { condition ?. value }
207
200
onChange = { ( value ) =>
208
- onChangeCondtion (
201
+ onChangeCondition (
209
202
index ,
210
203
value ,
211
204
'value'
@@ -218,7 +211,7 @@ const ConditionsControl = ({ conditions, setConditions }) => {
218
211
label = { __ ( 'Value' , 'feedzy-rss-feeds' ) }
219
212
value = { condition ?. value }
220
213
onChange = { ( value ) =>
221
- onChangeCondtion (
214
+ onChangeCondition (
222
215
index ,
223
216
value ,
224
217
'value'
0 commit comments