mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	Merge branch 'beta'
# Conflicts: # docs/backend_api/BAttachment.html # docs/backend_api/BNote.html # docs/backend_api/becca_entities_bnote.js.html # docs/frontend_api/FAttribute.html # docs/frontend_api/FBranch.html # docs/frontend_api/FNote.html # docs/frontend_api/FrontendScriptApi.html # docs/frontend_api/entities_fattachment.js.html # docs/frontend_api/entities_fattribute.js.html # docs/frontend_api/entities_fblob.js.html # docs/frontend_api/entities_fbranch.js.html # docs/frontend_api/entities_fnote.js.html # docs/frontend_api/global.html # docs/frontend_api/index.html # docs/frontend_api/services_frontend_script_api.js.html # package-lock.json
This commit is contained in:
		| @@ -54,7 +54,7 @@ const LOG_ALL_QUERIES = false; | ||||
| }); | ||||
|  | ||||
| function insert(tableName, rec, replace = false) { | ||||
|     const keys = Object.keys(rec); | ||||
|     const keys = Object.keys(rec || {}); | ||||
|     if (keys.length === 0) { | ||||
|         log.error(`Can't insert empty object into table ${tableName}`); | ||||
|         return; | ||||
| @@ -81,7 +81,7 @@ function replace(tableName, rec) { | ||||
| } | ||||
|  | ||||
| function upsert(tableName, primaryKey, rec) { | ||||
|     const keys = Object.keys(rec); | ||||
|     const keys = Object.keys(rec || {}); | ||||
|     if (keys.length === 0) { | ||||
|         log.error(`Can't upsert empty object into table ${tableName}`); | ||||
|         return; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user