prevent errors in renderer if keyfields are not available
authorPhilipp Schüle <p.schuele@metaways.de>
Tue, 23 Feb 2016 16:11:04 +0000 (17:11 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 24 Feb 2016 10:00:41 +0000 (11:00 +0100)
Change-Id: I1aa903da60cbcad813e328756992c02977ca6ce7
Reviewed-on: http://gerrit.tine20.com/customers/2788
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/js/widgets/keyfield/Renderer.js

index e18884e..17bf696 100644 (file)
@@ -28,12 +28,16 @@ Tine.Tinebase.widgets.keyfield.Renderer = function(){
          * @return Ext.data.Store
          */
         get: function(app, keyFieldName, what) {
          * @return Ext.data.Store
          */
         get: function(app, keyFieldName, what) {
-            var appName = Ext.isString(app) ? app : app.appName,
-                app = Tine.Tinebase.appMgr.get(appName),
-                store = Tine.Tinebase.widgets.keyfield.StoreMgr.get(app, keyFieldName),
-                what = what ? what : 'text|icon',
-                whatParts = what.split('|'),
-                key = appName + keyFieldName + what;
+            try {
+                var appName = Ext.isString(app) ? app : app.appName,
+                    app = Tine.Tinebase.appMgr.get(appName),
+                    store = Tine.Tinebase.widgets.keyfield.StoreMgr.get(app, keyFieldName),
+                    what = what ? what : 'text|icon',
+                    whatParts = what.split('|'),
+                    key = appName + keyFieldName + what;
+            } catch (e) {
+                Tine.log.error(e);
+            }
                 
             if (! renderers[key]) {
                 renderers[key] = function(id) {
                 
             if (! renderers[key]) {
                 renderers[key] = function(id) {