You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2015/04/14 10:17:46 UTC

cordova-plugin-file git commit: CB-8849 Fixed ReadAsArrayBuffer to return ArrayBuffer and not Array on WP8

Repository: cordova-plugin-file
Updated Branches:
  refs/heads/master 6f20c1926 -> 9fa0518d7


CB-8849 Fixed ReadAsArrayBuffer to return ArrayBuffer and not Array on WP8


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/9fa0518d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/9fa0518d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/9fa0518d

Branch: refs/heads/master
Commit: 9fa0518d7ade4f2f131ab829df8886849724ed95
Parents: 6f20c19
Author: alsorokin <al...@akvelon.com>
Authored: Mon Apr 13 13:51:17 2015 +0300
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Tue Apr 14 11:17:02 2015 +0300

----------------------------------------------------------------------
 www/FileReader.js | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/9fa0518d/www/FileReader.js
----------------------------------------------------------------------
diff --git a/www/FileReader.js b/www/FileReader.js
index 21ad29a..5c523aa 100644
--- a/www/FileReader.js
+++ b/www/FileReader.js
@@ -345,6 +345,9 @@ FileReader.prototype.readAsArrayBuffer = function(file) {
             // DONE state
             me._readyState = FileReader.DONE;
 
+            if (r instanceof Array) {
+                r = new Uint8Array(r).buffer;
+            }
             me._result = r;
 
             // If onload callback


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org