From 0ba420d8a7c88ac52df0ba2e20c026ed9b8e5c70 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sun, 4 Feb 2018 15:33:28 -0800 Subject: src/lapi.js: Shorter boolean coercion --- src/lapi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lapi.js b/src/lapi.js index 4c2641d..7c9317e 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -354,7 +354,7 @@ const lua_pushcfunction = function(L, fn) { const lua_pushjsfunction = lua_pushcfunction; const lua_pushboolean = function(L, b) { - L.stack[L.top] = new TValue(LUA_TBOOLEAN, b ? true : false); + L.stack[L.top] = new TValue(LUA_TBOOLEAN, !!b); api_incr_top(L); }; -- cgit v1.2.3-70-g09d2