Non-initialized vars should be first like:

```JS
var database, request,
    data = null,
    recordId = settings.recordId ? settings.recordId : "id",
    type = "IndexedDB";
```