From ce77a26a7314922bbf29ddba1bb97df2bd082d48 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Sat, 4 May 2013 14:37:50 +0530 Subject: [PATCH] Initialize to null for '!== null' checks to work --- js/chart.js | 2 +- js/server_privileges.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/chart.js b/js/chart.js index fd0cffc785..ee4e23f01e 100644 --- a/js/chart.js +++ b/js/chart.js @@ -216,7 +216,7 @@ JQPlotChartFactory.prototype.createChart = function (type, elementId) { */ var JQPlotChart = function (elementId) { Chart.call(this, elementId); - this.plot; + this.plot = null; this.validator; }; JQPlotChart.prototype = new Chart(); diff --git a/js/server_privileges.js b/js/server_privileges.js index 7e170fe613..9cc7af1ca6 100644 --- a/js/server_privileges.js +++ b/js/server_privileges.js @@ -405,7 +405,7 @@ AJAX.registerOnload('server_privileges.js', function () { // If any option other than 'keep the old one'(option 4) is chosen, we need to remove // the old one from the table. - var $row_to_remove; + var $row_to_remove = null; if (curr_submit_name == 'change_copy' && $('input[name=mode]:checked', '#fieldset_mode').val() != '4') { var old_username = $t.find('input[name="old_username"]').val();