CacheKeyInfo with a numeric jsonValue of 1
returns nil
#3414
Labels
awaiting response
bug
Generally incorrect behavior
needs investigation
planned-next
Slated to be included in the next release
Milestone
Summary
If an object has an id of
1
and that is used to createCacheKeyInfo
, it will returnnil
. The issue seems to be that it gets cast to aBool
inObjectData.swift:30
. Swift casting will convert any number with a value of 0 or 1 to a Bool when asked ((1 as AnyHashable) as? Bool
will resolve totrue
).Version
v1.13.0
Steps to reproduce the behavior
I modified
test__schemaConfiguration__givenData_whenUnknownType_withCacheKeyInfoForUnknownType_shouldReturnInfoWithTypeName
and was able to reproduce the issue with the following:Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: