Adding guard for non-Array initial state, and renaming state argument to initialState
Merge pull request #1 from allain/master

initial state handling