Fixing wrong change type on set

This commit is contained in:
Fabian Stamm 2019-11-07 00:18:15 +01:00
parent 3fa209c0cf
commit b3932aa54d
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@hibas123/realtimedb",
"version": "2.0.0-beta.2",
"version": "2.0.0-beta.3",
"description": "",
"main": "lib/index.js",
"private": true,

View File

@ -127,7 +127,7 @@ export class DocumentQuery extends Query {
const lock = await this.database.locks.lock(collection, document);
let isNew = await this.database.data.get(this.getKey(collection, document)).catch(resNull).then(e => e !== null);
let isNew = !(await this.getDoc(collection, document))
return this.database.data
.put(this.getKey(collection, document), encode(data))