[pve-devel] [PATCH manager 08/10] jslint: fix access to uninitialized variable

Dominik Csapak d.csapak at proxmox.com
Fri Apr 29 12:06:33 CEST 2016


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/dc/Backup.js         | 2 +-
 www/manager6/form/ComboGrid.js    | 2 +-
 www/manager6/form/MemoryField.js  | 2 +-
 www/manager6/node/Subscription.js | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js
index 7d2c038..14aee2d 100644
--- a/www/manager6/dc/Backup.js
+++ b/www/manager6/dc/Backup.js
@@ -437,7 +437,7 @@ Ext.define('PVE.dc.BackupView', {
 			var cur = -1;
 			val.split(',').forEach(function(day){
 			    cur++;
-			    dow = (dows.indexOf(day)+6)%7;
+			    var dow = (dows.indexOf(day)+6)%7;
 			    if (cur === dow) {
 				if (selected.length === 0 || selected[selected.length-1] === 0) {
 				    selected.push(1);
diff --git a/www/manager6/form/ComboGrid.js b/www/manager6/form/ComboGrid.js
index cd8c757..7aff5de 100644
--- a/www/manager6/form/ComboGrid.js
+++ b/www/manager6/form/ComboGrid.js
@@ -165,7 +165,7 @@ Ext.define('PVE.form.ComboGrid', {
         picker = me.picker || Ext.widget(pickerCfg);
 
         if (picker.getStore() !== me.store) {
-            picker.bindStore(store);
+            picker.bindStore(me.store);
         }
 
         if (me.pageSize) {
diff --git a/www/manager6/form/MemoryField.js b/www/manager6/form/MemoryField.js
index 3a09697..1c9bca9 100644
--- a/www/manager6/form/MemoryField.js
+++ b/www/manager6/form/MemoryField.js
@@ -69,7 +69,7 @@ Ext.define('PVE.form.MemoryField', {
 	    me.minValue = 1024;
 
 	    me.on('blur', function(field) {
-		value = me.getValue();
+		var value = me.getValue();
 		var res = me.computeUpDown(value);
 		if (value === res.start || value === res.up || value === res.down) {
 		    return;
diff --git a/www/manager6/node/Subscription.js b/www/manager6/node/Subscription.js
index c6dcc2e..8309693 100644
--- a/www/manager6/node/Subscription.js
+++ b/www/manager6/node/Subscription.js
@@ -56,8 +56,8 @@ Ext.define('PVE.node.Subscription', {
 			{
 			    text: gettext('Download'),
 			    handler: function() {
-				fileContent = reportWindow.getComponent('system-report-view').html;
-				fileName = getReportFileName();
+				var fileContent = reportWindow.getComponent('system-report-view').html;
+				var fileName = getReportFileName();
 
 				// Internet Explorer
 				if (window.navigator.msSaveOrOpenBlob) {
-- 
2.1.4




More information about the pve-devel mailing list