You'd better make a check here to ensure indexedDB is available and not undefined.