I have an ExtJS xtemplate that is throwing errors because of the way a json object is returned.
Sometimes the json object has a field customer defined, but sometimes it’s completely missing from the object.
Obviously, I get an error customer is not defined when applying my template to the json where the field is missing.
So my question is:
Is there a way that I can check for an undefined field in an xtemplate?
Like:
<tpl if="customer!=undefined">{customer}</tpl>
obviously I’ve tried this but it doesn’t work.
Thanks for any help.
Have you tried this?