From e732dc499ca9ae68473c51b56cba7679c8e8c08b Mon Sep 17 00:00:00 2001 From: Bradley Momberger Date: Wed, 8 Jun 2022 18:21:07 -0400 Subject: [PATCH] iOS Safari: don't clone loader too deeply --- ext/steal-clone.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/steal-clone.js b/ext/steal-clone.js index af2563254..c5009f003 100644 --- a/ext/steal-clone.js +++ b/ext/steal-clone.js @@ -54,7 +54,10 @@ function cloneConfig(obj, isTopLevel) { clone = {}; for (var attr in obj) { obj['isCloned'] = true; // prevent infinite recursion - if (hasOwnProperty.call(obj, attr)) { + if ( + hasOwnProperty.call(obj, attr) && + typeof Object.getOwnPropertyDescriptor(obj, attr).get !== 'function' // safari/iOS returns true for hasOwnProperty on getter properties in objects + ) { if (isTopLevel) { // exclude specific props and functions from top-level of config if (typeof obj[attr] !== 'function' &&