Created
April 12, 2012 23:27
-
-
Save cvan/2371861 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/media/js/mkt/apps.js b/media/js/mkt/apps.js | |
index a43b8d8..a8394b7 100644 | |
--- a/media/js/mkt/apps.js | |
+++ b/media/js/mkt/apps.js | |
@@ -42,7 +42,7 @@ exports.install = function(product, opt) { | |
$def = $.Deferred(); | |
/* Try and install the app. */ | |
if (manifestUrl && opt.navigator.mozApps && opt.navigator.mozApps.install) { | |
- var installRequest = opt.navigator.mozApps.install(manifestUrl, opt); | |
+ var installRequest = opt.navigator.mozApps.install(manifestUrl, opt.data); | |
installRequest.onsuccess = function() { | |
$def.resolve(product); | |
}; | |
diff --git a/media/js/mkt/install.js b/media/js/mkt/install.js | |
index bb1e9fd..addbb2c 100644 | |
--- a/media/js/mkt/install.js | |
+++ b/media/js/mkt/install.js | |
@@ -48,7 +48,7 @@ | |
$(window).trigger('app_install_start', product); | |
$.post(product.recordUrl).success(function(response) { | |
if (response.receipt) { | |
- data.receipts = [response.receipt]; | |
+ data['data'] = {'receipts': [response.receipt]}; | |
} | |
$.when(apps.install(product, data)) | |
.done(installSuccess) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment