You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2012/10/29 23:47:12 UTC
[9/11] js commit: [windows8] make sure win() is defined before we
call it ...
[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 <pu...@gmail.com>
Authored: Thu Oct 18 18:05:30 2012 -0700
Committer: Jesse MacFadyen <pu...@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) {