Fix error in historylog caused by trying to load a template widget for infolog status 'template'

This commit is contained in:
Nathan Gray 2015-04-08 20:49:36 +00:00
parent c58b950a71
commit 894714c3f5

View File

@ -288,10 +288,13 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider,et2_IResizeable],
var widget = null; var widget = null;
if(typeof field == 'object') if(typeof field == 'object')
{ {
// Check for multi-part statuses needing multiple widgets
var need_box = false; var need_box = false;
for(var j in field) for(var j in field)
{ {
if(et2_registry[field[j]]) // Require widget to be a valueWidget, to avoid invalid widgets
// (and template, which is a widget and an infolog todo status)
if(et2_registry[field[j]] && et2_registry[field[j]].prototype.instanceOf(et2_valueWidget))
{ {
need_box = true; need_box = true;
break; break;