@@ -169,11 +169,6 @@ extension OptimizelyUserContext {
169
169
/// - decision: A forced decision.
170
170
/// - Returns: true if the forced decision has been set successfully.
171
171
public func setForcedDecision( context: OptimizelyDecisionContext , decision: OptimizelyForcedDecision ) -> Bool {
172
- guard optimizely? . config != nil else {
173
- logger. e ( OptimizelyError . sdkNotReady)
174
- return false
175
- }
176
-
177
172
// create on the first setForcedDecision call
178
173
179
174
if forcedDecisions == nil {
@@ -189,11 +184,6 @@ extension OptimizelyUserContext {
189
184
/// - context: A decision context
190
185
/// - Returns: A forced decision or nil if forced decisions are not set for the decision context.
191
186
public func getForcedDecision( context: OptimizelyDecisionContext ) -> OptimizelyForcedDecision ? {
192
- guard optimizely? . config != nil else {
193
- logger. e ( OptimizelyError . sdkNotReady)
194
- return nil
195
- }
196
-
197
187
guard forcedDecisions != nil else { return nil }
198
188
199
189
return findForcedDecision ( context: context)
@@ -204,11 +194,6 @@ extension OptimizelyUserContext {
204
194
/// - context: A decision context.
205
195
/// - Returns: true if the forced decision has been removed successfully.
206
196
public func removeForcedDecision( context: OptimizelyDecisionContext ) -> Bool {
207
- guard optimizely? . config != nil else {
208
- logger. e ( OptimizelyError . sdkNotReady)
209
- return false
210
- }
211
-
212
197
guard let fds = forcedDecisions else { return false }
213
198
214
199
if findForcedDecision ( context: context) != nil {
@@ -222,11 +207,6 @@ extension OptimizelyUserContext {
222
207
/// Removes all forced decisions bound to this user context.
223
208
/// - Returns: true if forced decisions have been removed successfully.
224
209
public func removeAllForcedDecisions( ) -> Bool {
225
- guard optimizely? . config != nil else {
226
- logger. e ( OptimizelyError . sdkNotReady)
227
- return false
228
- }
229
-
230
210
if let fds = forcedDecisions {
231
211
fds. removeAll ( )
232
212
}
0 commit comments