Skip to content

Commit

Permalink
fix: type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathannorris committed Aug 25, 2023
1 parent 7f644eb commit 18426b0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions DevCycle/Models/UserConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,14 @@ public struct Variable: Equatable {
}

switch lhs.type {
case "Boolean":
case .Boolean:
return (lhs.value as! Bool) == (rhs.value as! Bool)
case "String":
case .String:
return (lhs.value as! String) == (rhs.value as! String)
case "Number":
case .Number:
return (lhs.value as! NSNumber) == (rhs.value as! NSNumber)
case "JSON":
case .JSON:
return (lhs.value as! NSDictionary) == (rhs.value as! NSDictionary)
default:
return false
}
}
}

0 comments on commit 18426b0

Please sign in to comment.