You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/01/21 18:14:26 UTC

js commit: [ios] Use utils.typeName() helper function.

Updated Branches:
  refs/heads/master 7d5552049 -> 17cc361fb


[ios] Use utils.typeName() helper function.


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/17cc361f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/17cc361f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/17cc361f

Branch: refs/heads/master
Commit: 17cc361fb9cb89a8a676f5199aa50a0ec14a7ef0
Parents: 7d55520
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Jan 21 12:14:07 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Jan 21 12:14:07 2013 -0500

----------------------------------------------------------------------
 lib/ios/exec.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/17cc361f/lib/ios/exec.js
----------------------------------------------------------------------
diff --git a/lib/ios/exec.js b/lib/ios/exec.js
index 89d7615..8ad37d1 100644
--- a/lib/ios/exec.js
+++ b/lib/ios/exec.js
@@ -72,7 +72,7 @@ function massageArgsJsToNative(args) {
         return window.btoa(encodeArrayBufferAs8bitString(ab));
     };
     args.forEach(function(arg, i) {
-        if (Object.prototype.toString.call(arg).slice(8, -1) == 'ArrayBuffer') {
+        if (utils.typeName(arg) == 'ArrayBuffer') {
             args[i] = {
                 'CDVType': 'ArrayBuffer',
                 'data': encodeArrayBufferAsBase64(arg)