fix to "Cannot read property 'constructor' of undefined"

Does this fix https://github.com/share/livedb/commit/3768ea34d3c8a514d59e1f5e59ed6ea736232c13