suggestion for raw function in Model.js

edited January 2014 in Enyo 2.4
Wondering if line with instanceof enyo.Collection should should be } else if (r[k] instanceof enyo.Collection||r[k] instanceof enyo.Model) { instead?

Cage
raw: function () {
			var i = this.includeKeys,
				a = this.attributes,
				r = i? enyo.only(i, a): enyo.clone(a);
			for (var k in r) {
				if ("function" == typeof r[k]) {
					r[k] = r[k].call(this);
//				} else if (r[k] instanceof enyo.Collection) {
//changed above line to:
				} else if (r[k] instanceof enyo.Collection||r[k] instanceof enyo.Model) {
					r[k] = r[k].raw();
				}
			}
			return r;
		},
Sign In or Register to comment.