From 7d7d640823920b146382089240fb0dce3b206e83 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 13 Jan 2016 08:32:37 -0800 Subject: [PATCH] Temporary hack to support older JavaScriptCore :/. --- libcycript.cy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libcycript.cy b/libcycript.cy index c243072..5c80940 100644 --- a/libcycript.cy +++ b/libcycript.cy @@ -27,12 +27,13 @@ this.typeid = function(object) { let $cy_set = function(object, properties) { for (const name in properties) + if ("defineProperty" in Object) Object.defineProperty(object, name, { configurable: true, enumerable: false, writable: true, value: properties[name], - }); + }); else object[name] = properties[name]; }; $cy_set(Boolean.prototype, { -- 2.47.2