From 30a81f9f324fb69b957954d4d31a9b45c6a6a290 Mon Sep 17 00:00:00 2001 From: Chris Van Date: Thu, 12 Apr 2012 16:33:13 -0700 Subject: [PATCH] fix app install (bug 744999) --- media/js/mkt/apps.js | 2 +- media/js/mkt/install.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/media/js/mkt/apps.js b/media/js/mkt/apps.js index a43b8d8b666..a8394b783de 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 bb1e9fd85e9..addbb2cc4d0 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)