From c95ddb3b45b536f193d60065f7c1cef1ebd44491 Mon Sep 17 00:00:00 2001 From: vijay Date: Wed, 20 Nov 2019 12:45:35 -0800 Subject: [PATCH] fix(ios): fix toString() for binary blobs should report "[object TiBlob]" Fixes TIMOB-27350 --- common/Resources/ti.internal/extensions/ti/ti.blob.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/Resources/ti.internal/extensions/ti/ti.blob.js b/common/Resources/ti.internal/extensions/ti/ti.blob.js index 865d33a0446..3489c70ca19 100644 --- a/common/Resources/ti.internal/extensions/ti/ti.blob.js +++ b/common/Resources/ti.internal/extensions/ti/ti.blob.js @@ -9,6 +9,7 @@ if (Ti.Platform.osname === 'iphone' || Ti.Platform.osname === 'ipad') { const buffer = Ti.createBuffer({ value: '' }); const blob = buffer.toBlob(); blob.constructor.prototype.toString = function () { - return this.text; + const value = this.text; + return (value === undefined) ? '[object TiBlob]' : value; }; }