Property parse is not a function error with 2.3

Hi,
I'm getting: Uncaught TypeError: Property 'parse' of object # is not a function
error - it points to Model.js:266

Any thoughts?
Thanks,
Cage
constructor: function (attributes, opts) {
			if (opts) { this.importProps(opts); }
			this.euid = enyo.uuid();
			var a = this.attributes = (this.attributes? enyo.clone(this.attributes): {}),
				d = this.defaults,
				x = attributes;
			if (x) { enyo.mixin(a, this.parse(x)); }
Uncaught TypeError: Property 'parse' of object # is not a function
			if (d) { enyo.mixin(a, d, _mixinOpts); }
			this.changed = {};
			// populate the previous property with the actual values as would be expected
			// for further updates
			this.previous = this.raw();
			this.storeChanged();
		},

Comments

  • parse is a method of enyo.Model, so it should exist on this at the time constructor is called. It's only called if the constructor is called with an attributes object.

    Can you provide more context? What's the call stack here? Are you using a collection? A custom Store object?
Sign In or Register to comment.