Skip to content
This repository has been archived by the owner on Jul 12, 2018. It is now read-only.

Commit

Permalink
Fixed a bug where the id was not set without a schema
Browse files Browse the repository at this point in the history
  • Loading branch information
jhnns committed Jan 8, 2014
1 parent 7122696 commit 73125c6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/shared/Model.class.js
Expand Up @@ -337,11 +337,6 @@ var Model = EventEmitter.extend("Model", Junction, {
customSetters,
i;

// Check if there is a schema
if (!this._types) {
return newValue;
}

if (key === "id") {
this.setId(newValue);
return newValue;
Expand All @@ -350,6 +345,11 @@ var Model = EventEmitter.extend("Model", Junction, {
return newValue;
}

// Check if there is a schema
if (!this._types) {
return newValue;
}

expectedType = this._types[key];

if (expectedType === undefined) {
Expand Down

0 comments on commit 73125c6

Please sign in to comment.