diff --git a/MVMCore/MVMCore/Categories/Dictionary+MFConvenience.swift b/MVMCore/MVMCore/Categories/Dictionary+MFConvenience.swift index 46dbc01..f5e402e 100644 --- a/MVMCore/MVMCore/Categories/Dictionary+MFConvenience.swift +++ b/MVMCore/MVMCore/Categories/Dictionary+MFConvenience.swift @@ -80,8 +80,11 @@ public extension Dictionary { return arrayForChainOfKeysOrIndexes([key]) } - func optionalArrayForKey(_ key : String) -> [Any]? { - return optionalArrayForChainOfKeysOrIndexes([key]) + func optionalArrayForKey(_ key : String) -> [Any]? { + guard let key = key as? Key else { + return nil + } + return self[key] as? [Any] } /// Return a Bool after looking up the specified key. This will return false if the key does not exist