From e56d10c2c7ef984e4e5e1556bc284536ab1c3e67 Mon Sep 17 00:00:00 2001 From: Umair Khan Date: Wed, 4 Dec 2013 22:42:33 +0530 Subject: [PATCH 1/2] bugfix in error_report.js Signed-off-by: Umair Khan --- js/error_report.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/error_report.js b/js/error_report.js index 3fdbb69f3d..7ba3c77331 100644 --- a/js/error_report.js +++ b/js/error_report.js @@ -213,7 +213,7 @@ var ErrorReport = { "current_url": window.location.href, "microhistory": ErrorReport._get_microhistory() }; - if (typeof AJAX.cache.pages[this.current - 1] === 'undefined') { + if (typeof AJAX.cache.pages[AJAX.cache.current - 1] === 'undefined') { report_data.scripts = AJAX.cache.pages[AJAX.cache.current - 1].scripts.map( function (script) { return script.name; From ef9cfa247416613a01c88713e21779dfbc64d8f0 Mon Sep 17 00:00:00 2001 From: Umair Khan Date: Sat, 7 Dec 2013 08:51:44 +0530 Subject: [PATCH 2/2] Fixing the if condition in get_report_data Signed-off-by: Umair Khan --- js/error_report.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/error_report.js b/js/error_report.js index 7ba3c77331..c3765304d0 100644 --- a/js/error_report.js +++ b/js/error_report.js @@ -213,7 +213,7 @@ var ErrorReport = { "current_url": window.location.href, "microhistory": ErrorReport._get_microhistory() }; - if (typeof AJAX.cache.pages[AJAX.cache.current - 1] === 'undefined') { + if (typeof AJAX.cache.pages[AJAX.cache.current - 1] !== 'undefined') { report_data.scripts = AJAX.cache.pages[AJAX.cache.current - 1].scripts.map( function (script) { return script.name;