From 58a7857dfa6aa6a47d9b24e3628e16a3e6dba58b Mon Sep 17 00:00:00 2001 From: igurisandhu Date: Fri, 27 Sep 2024 20:26:34 +0530 Subject: [PATCH] fix: correct negated expression for Object.defineProperty check (#101) --- example/game/crafty/js/crafty.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/game/crafty/js/crafty.js b/example/game/crafty/js/crafty.js index b7f12c8..143ccd0 100755 --- a/example/game/crafty/js/crafty.js +++ b/example/game/crafty/js/crafty.js @@ -4303,7 +4303,7 @@ Crafty.storage = (function () { * Is `Object.defineProperty` supported? */ support.defineProperty = (function () { - if (!'defineProperty' in Object) return false; + if (!('defineProperty' in Object)) return false; try { Object.defineProperty({}, 'x', {}); } catch (e) { return false }; return true;