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.
I think either angular.copy should use ArrayBuffer.prototype.slice() (Polyfills are available for old browsers) or, at least, throw a warning to the user indicating that an ArrayBufferView must be used.
It can leads to misunderstanding of some "simple" pieces of code.
// Following HTTP mock will return incorrect value because of angular.copy.
$httpBackend.whenGET(/.*/).respond(
function() {
var zip = new JSZip();
zip.file("nested/hello.txt", "Hello World\n");
var archive = zip.generate({type:"arraybuffer"});
return [200, archive, {
'Content-Type': 'application/zip',
'content-transfer-encoding': 'binary'
}];
}
);
The text was updated successfully, but these errors were encountered:
When trying to copy an existing ArrayBuffer without using any specific view, angular.copy returns an empty / unusable object.
( JSFiddle to test )
I think either angular.copy should use ArrayBuffer.prototype.slice() (Polyfills are available for old browsers) or, at least, throw a warning to the user indicating that an ArrayBufferView must be used.
It can leads to misunderstanding of some "simple" pieces of code.
The text was updated successfully, but these errors were encountered: