Add a warning if trying to set an attribute to an Object, so it doesn't just disappear

This commit is contained in:
Nathan Gray 2011-10-06 23:04:40 +00:00
parent 08f5e28d00
commit be79886301

View File

@ -525,10 +525,15 @@ var et2_widget = Class.extend({
{
for (var key in data)
{
// TODO: Why?
if (!(data[key] instanceof Object))
{
_attrs[key] = data[key];
}
else
{
et2_debug("warn", "Attributes cannot be objects", this, key, data[key]);
}
}
}
}