diff app/view/form/Probe.js @ 1234:390dabbf27ed

Empty string for media descriptor is disallowed. This follows server Rev 1ef08710aaeb.
author Tom Gottfried <tom@intevation.de>
date Fri, 28 Oct 2016 21:23:31 +0200
parents 4270da0f7d3b
children d1f43f1e7e84
line wrap: on
line diff
--- a/app/view/form/Probe.js	Fri Oct 28 20:04:20 2016 +0200
+++ b/app/view/form/Probe.js	Fri Oct 28 21:23:31 2016 +0200
@@ -410,8 +410,11 @@
     },
 
     setMediaDesk: function(record) {
-        var media = record.get('mediaDesk').split(' ');
-        this.setMediaSN(0, media);
+        var media = record.get('mediaDesk');
+        if (media) {
+            var mediaParts = media.split(' ');
+            this.setMediaSN(0, mediaParts);
+        }
     },
 
     setMediaSN: function(ndx, media) {

http://lada.wald.intevation.org