Skip to content

Commit

Permalink
fix(ios): fix toString() for binary blobs
Browse files Browse the repository at this point in the history
should report "[object TiBlob]"

Fixes TIMOB-27350
  • Loading branch information
vijaysingh-axway authored and sgtcoolguy committed Dec 16, 2019
1 parent e562969 commit c95ddb3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/Resources/ti.internal/extensions/ti/ti.blob.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
}

0 comments on commit c95ddb3

Please sign in to comment.