-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Hello,
I was getting "unexpectedly found nil while unwrapping an Optional value". in ReSwift-Recorder
What is the problem in code below?
AppDelegate
var store = RecordingMainStore<BaseState>(
reducer: BaseReducer(),
state: nil,
typeMaps:[accountsActionTypeMap, ReSwiftRouter.typeMap],
recording: "recording.json"
)
Actions
let accountsActionTypeMap: TypeMap = [AccountsListAction.type: AccountsListAction.self,
AccountDetailAction.type: AccountDetailAction.self,
AccountIdentifierAction.type: AccountIdentifierAction.self]
struct AccountsListAction: StandardActionConvertible {
static let type = "ACCOUNTS_LIST_ACTION"
var accounts: [IdentifiersResponse]?
init(accounts: [IdentifiersResponse]) { self.accounts = accounts }
init() {}
init(_ standardAction: StandardAction) {
self.accounts = [IdentifiersResponse]()
}
func toStandardAction() -> StandardAction {
return StandardAction(type: AccountsListAction.type,
payload: ["accounts": accounts as! AnyObject],
isTypedAction: true)
}
}
Stack trace (RecordingStore.swift: 145)
Using ReSwift (2.1.0)
Using ReSwiftRecorder (0.3.0)
Using ReSwiftRouter (0.3.0)
Xcode 7.3
Swift 2.3
Metadata
Metadata
Assignees
Labels
No labels
