Skip to content

Commit

Permalink
dont assert loaded state if reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Aug 21, 2018
1 parent 2ddc94a commit 365f4f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export default class BelongsToRelationship extends Relationship {
"' with id " +
this.internalModel.id +
' but some of the associated records were not loaded. Either make sure they are all loaded together with the parent record, or specify that the relationship is async (`DS.belongsTo({ async: true })`)',
record === null || !record.get('isEmpty')
record === null || !record.get('isEmpty') || this.shouldForceReload
);
return record;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ export default class ManyRelationship extends Relationship {
}' with id ${
this.internalModel.id
} but some of the associated records were not loaded. Either make sure they are all loaded together with the parent record, or specify that the relationship is async (\`DS.hasMany({ async: true })\`)`,
this.allInverseRecordsAreLoaded
this.allInverseRecordsAreLoaded || this.shouldForceReload
);

return manyArray;
Expand Down

0 comments on commit 365f4f6

Please sign in to comment.