Fixing wrong change type on set
This commit is contained in:
parent
3fa209c0cf
commit
b3932aa54d
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hibas123/realtimedb",
|
"name": "@hibas123/realtimedb",
|
||||||
"version": "2.0.0-beta.2",
|
"version": "2.0.0-beta.3",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
@ -127,7 +127,7 @@ export class DocumentQuery extends Query {
|
|||||||
|
|
||||||
const lock = await this.database.locks.lock(collection, document);
|
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
|
return this.database.data
|
||||||
.put(this.getKey(collection, document), encode(data))
|
.put(this.getKey(collection, document), encode(data))
|
||||||
|
Reference in New Issue
Block a user