forked from cory/tildefriends
		
	Actually return the blob ID from store.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4361 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
		
							
								
								
									
										11
									
								
								src/ssb.js.c
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								src/ssb.js.c
									
									
									
									
									
								
							| @@ -216,7 +216,16 @@ typedef struct _blob_store_t | |||||||
|  |  | ||||||
| void _tf_ssb_blob_store_complete(blob_store_t* store, const char* id) | void _tf_ssb_blob_store_complete(blob_store_t* store, const char* id) | ||||||
| { | { | ||||||
| 	JSValue result = JS_Call(store->context, id ? store->promise[0] : store->promise[1], JS_UNDEFINED, 0, NULL); | 	JSValue result = JS_UNDEFINED; | ||||||
|  | 	if (id) | ||||||
|  | 	{ | ||||||
|  | 		JSValue id_value = JS_NewString(store->context, id); | ||||||
|  | 		JS_Call(store->context, store->promise[0], JS_UNDEFINED, 1, &id_value); | ||||||
|  | 	} | ||||||
|  | 	else | ||||||
|  | 	{ | ||||||
|  | 		JS_Call(store->context, store->promise[1], JS_UNDEFINED, 0, NULL); | ||||||
|  | 	} | ||||||
| 	tf_util_report_error(store->context, result); | 	tf_util_report_error(store->context, result); | ||||||
| 	JS_FreeValue(store->context, result); | 	JS_FreeValue(store->context, result); | ||||||
| 	JS_FreeValue(store->context, store->promise[0]); | 	JS_FreeValue(store->context, store->promise[0]); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user