From: Jay Freeman (saurik) Date: Wed, 13 Jan 2016 16:32:37 +0000 (-0800) Subject: Temporary hack to support older JavaScriptCore :/. X-Git-Tag: v0.9.592~1 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/7d7d640823920b146382089240fb0dce3b206e83?ds=sidebyside Temporary hack to support older JavaScriptCore :/. --- 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, {