]> git.saurik.com Git - cycript.git/commitdiff
Temporary hack to support older JavaScriptCore :/.
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 13 Jan 2016 16:32:37 +0000 (08:32 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 13 Jan 2016 16:32:37 +0000 (08:32 -0800)
libcycript.cy

index c2430724cde5f5b1060e60b0a896593420db7fda..5c809401c01394c5c2dba712d65107058767260d 100644 (file)
@@ -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, {