summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-02-04 15:33:28 -0800
committerdaurnimator <quae@daurnimator.com>2018-02-04 15:33:28 -0800
commit0ba420d8a7c88ac52df0ba2e20c026ed9b8e5c70 (patch)
tree6caf74217b0e410c2595382bf2d866ea589ada7a /src
parentb0ad3a83d4b59136a8246e9c524be7f80fd2f4a3 (diff)
downloadfengari-0ba420d8a7c88ac52df0ba2e20c026ed9b8e5c70.tar.gz
fengari-0ba420d8a7c88ac52df0ba2e20c026ed9b8e5c70.tar.bz2
fengari-0ba420d8a7c88ac52df0ba2e20c026ed9b8e5c70.zip
src/lapi.js: Shorter boolean coercion
Diffstat (limited to 'src')
-rw-r--r--src/lapi.js2
1 files changed, 1 insertions, 1 deletions
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);
};