remove undefined; only use null now
This commit is contained in:
@@ -20,7 +20,7 @@ cell_rt *js2actor(JSContext *js, JSValue v)
|
||||
cell_rt *crt = JS_GetContextOpaque(js);
|
||||
JSValue actor_data = JS_GetProperty(js, v, crt->actor_sym);
|
||||
|
||||
if (JS_IsUndefined(actor_data)) {
|
||||
if (JS_IsNull(actor_data)) {
|
||||
JS_FreeValue(js, actor_data);
|
||||
return NULL;
|
||||
}
|
||||
@@ -28,7 +28,7 @@ cell_rt *js2actor(JSContext *js, JSValue v)
|
||||
JSValue id_val = JS_GetPropertyStr(js, actor_data, "id");
|
||||
JS_FreeValue(js, actor_data);
|
||||
|
||||
if (JS_IsUndefined(id_val)) {
|
||||
if (JS_IsNull(id_val)) {
|
||||
JS_FreeValue(js, id_val);
|
||||
return NULL;
|
||||
}
|
||||
@@ -78,7 +78,7 @@ JSC_CCALL(os_createactor,
|
||||
if (rt->disrupt)
|
||||
return JS_ThrowInternalError(js, "Can't start a new actor while disrupting.");
|
||||
|
||||
void *startup = value2wota(js, argv[0], JS_UNDEFINED, NULL);
|
||||
void *startup = value2wota(js, argv[0], JS_NULL, NULL);
|
||||
create_actor(startup);
|
||||
)
|
||||
|
||||
@@ -98,7 +98,7 @@ JSC_CCALL(os_mailbox_push,
|
||||
JS_FreeCString(js,id);
|
||||
|
||||
/* JSValue sys = JS_GetPropertyStr(js, argv[1], "__SYSTEM__");
|
||||
if (!JS_IsUndefined(sys)) {
|
||||
if (!JS_IsNull(sys)) {
|
||||
const char *k = JS_ToCString(js,sys);
|
||||
int stop = 0;
|
||||
if (strcmp(k, "stop") == 0) {
|
||||
@@ -108,7 +108,7 @@ JSC_CCALL(os_mailbox_push,
|
||||
JS_FreeValue(js,sys);
|
||||
JS_FreeCString(js,k);
|
||||
|
||||
if (stop) return JS_UNDEFINED;
|
||||
if (stop) return JS_NULL;
|
||||
}
|
||||
*/
|
||||
size_t size;
|
||||
|
||||
Reference in New Issue
Block a user