You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
other (Please do not submit support requests here (see above))
Current behavior:
angular.merge doesn't copy Blob objects from source to destination.
The property is copied but the value is no longer a Blob object but an empty Object.
Expected / new behavior:
The expected behaviour would be to copy the Blob as is from source to destination. Object.assign behaves this way (doesn't have this bug).
Minimal reproduction of the problem with instructions:
var aFileParts = ['<a id="a"><b id="b">hey!</b></a>']; // an array consisting of a single DOMString
var oMyBlob = new Blob(aFileParts, {type : 'text/html'}); // the blob
var obj1 = {blob: oMyBlob, foo: 1};
var obj2 = angular.merge({}, obj1, {foo: 2});
var obj3 = Object.assign({}, obj1, {foo: 2});
console.assert(obj2.blob instanceof Blob === obj3.blob instanceof Blob, 'angular.merge should copy Blobs like Object.assign');