C2DH / tim

Timecode Indexing Module
https://c2dh.github.io/tim/
MIT License
6 stars 6 forks source link

localstorage not being initialised the first time through causing inactive buttons #105

Closed maboa closed 3 years ago

maboa commented 3 years ago

This is the error we see in the console:

redux-logger.js:1 Uncaught TypeError: Cannot read property 'findIndex' of undefined
    at add (data.js:228)
    at createReducer.ts:160
    at Array.reduce (<anonymous>)
    at createReducer.ts:143
    at redux.js:459
    at m (redux.js:213)
    at index.js:11
    at index.js:260
    at redux-logger.js:1
    at redux.js:477
    at CreateNote.js:130
    at i (usePress.ts:168)
    at HTMLDocument.x (usePress.ts:341)
add @ data.js:228
(anonymous) @ createReducer.ts:160
(anonymous) @ createReducer.ts:143
(anonymous) @ redux.js:459
m @ redux.js:213
(anonymous) @ index.js:11
(anonymous) @ index.js:260
(anonymous) @ redux-logger.js:1
(anonymous) @ redux.js:477
(anonymous) @ CreateNote.js:130
i @ usePress.ts:168
x @ usePress.ts:341
maboa commented 3 years ago

looks good