]> git.proxmox.com Git - pmg-gui.git/blobdiff - js/ViewMailHeaders.js
jslint: if needs a block
[pmg-gui.git] / js / ViewMailHeaders.js
index c4059f2fa9c494e035acbb5a23faf69fe0855aef..f3cd4ba5f8e69f7481edd84909ac9654c9ab034e 100644 (file)
@@ -34,11 +34,17 @@ Ext.define('PMG.ViewMailHeaders', {
                success: function(response, opts) {
                    var data = response.result.data;
                    var from = data.match(/^FROM:\s*(.*\S)\s*$/mi);
-                   if (from) view.lookupReference('fromField').setValue(from[1]);
+                   if (from) {
+                       view.lookupReference('fromField').setValue(from[1]);
+                   }
                    var to = data.match(/^TO:\s*(.*\S)\s*$/mi);
-                   if (to) view.lookupReference('toField').setValue(to[1]);
+                   if (to) {
+                       view.lookupReference('toField').setValue(to[1]);
+                   }
                    var subject = data.match(/^SUBJECT:\s*(.*\S)\s*$/mi);
-                   if (subject) view.lookupReference('subjectField').setValue(subject[1]);
+                   if (subject) {
+                       view.lookupReference('subjectField').setValue(subject[1]);
+                   }
                    panel.update(Ext.String.htmlEncode(data));
                },
                failure: function (response, opts) {