cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [9/11] js commit: [windows8] make sure win() is defined before we call it ...
Date Mon, 29 Oct 2012 22:47:12 GMT
[windows8] make sure win() is defined before we call it ...


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

Branch: refs/heads/master
Commit: 56d29de77e0d4a48e3e7cec3dc1ec1ffbc68a440
Parents: b8ba74e
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Thu Oct 18 18:05:30 2012 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Thu Oct 18 18:05:30 2012 -0700

----------------------------------------------------------------------
 lib/windows8/plugin/windows8/AccelerometerProxy.js |    1 +
 lib/windows8/plugin/windows8/MediaFile.js          |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/56d29de7/lib/windows8/plugin/windows8/AccelerometerProxy.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/windows8/AccelerometerProxy.js b/lib/windows8/plugin/windows8/AccelerometerProxy.js
index 91916b0..6ce617f 100644
--- a/lib/windows8/plugin/windows8/AccelerometerProxy.js
+++ b/lib/windows8/plugin/windows8/AccelerometerProxy.js
@@ -53,6 +53,7 @@ module.exports = {
         }
     },
     stop:function(win,lose){
+        win = win || function(){};
         var accel = Windows.Devices.Sensors.Accelerometer.getDefault();
         if(!accel) {
             lose && lose("No accelerometer found");

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/56d29de7/lib/windows8/plugin/windows8/MediaFile.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/windows8/MediaFile.js b/lib/windows8/plugin/windows8/MediaFile.js
index af0661e..1709b9e 100644
--- a/lib/windows8/plugin/windows8/MediaFile.js
+++ b/lib/windows8/plugin/windows8/MediaFile.js
@@ -29,7 +29,7 @@ module.exports = {
     getFormatData: function (successCallback, errorCallback, args) {
         Windows.Storage.StorageFile.getFileFromPathAsync(this.fullPath).then(
             function (storageFile) {
-                var mediaTypeFlag = String(contentType).split("/")[0].toLowerCase();
+                var mediaTypeFlag = String(storageFile.contentType).split("/")[0].toLowerCase();
                 if (mediaTypeFlag === "audio") {
                     storageFile.properties.getMusicPropertiesAsync().then(
                         function (audioProperties) {


Mime
View raw message