1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-01 08:03:32 +00:00

Fixed bug introduced with Jan 06 commit, where emit returned true if there was more than 1 listener instead of more than 0 listeners.

This commit is contained in:
Bryan Roe
2020-02-07 14:53:59 -08:00
parent 8b9988b88d
commit 066c173340

View File

@@ -280,7 +280,7 @@ duk_ret_t ILibDuktape_EventEmitter_emit(duk_context *ctx)
duk_pop(ctx); // ...
}
duk_push_boolean(ctx, i > 1 ? 1 : 0);
duk_push_boolean(ctx, i > 0 ? 1 : 0);
return(1);
}
int ILibDuktape_EventEmitter_PrependOnce(duk_context *ctx, duk_idx_t i, char *eventName, duk_c_function func)