Skip to content

Commit

Permalink
explore stricter
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Aug 11, 2022
1 parent 91eb8b7 commit c8fc274
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default function updateRelationshipOperation(graph: Graph, op: UpdateRela
payload.data = [];
}
assert(`Expected an array`, Array.isArray(payload.data));
// TODO may not need to cast to stable identifiers here since update likely does this too
graph.update(
{
op: 'replaceRelatedRecords',
Expand All @@ -45,6 +46,7 @@ export default function updateRelationshipOperation(graph: Graph, op: UpdateRela
true
);
} else {
// TODO may not need to cast to stable identifiers here since update likely does this too
graph.update(
{
op: 'replaceRelatedRecord',
Expand Down
1 change: 1 addition & 0 deletions packages/store/addon/-private/caches/instance-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ export class InstanceCache {

this._storeWrapper = new RecordDataStoreWrapper(this.store);
this.__recordDataFor = (resource: RecordIdentifier) => {
// TODO enforce strict
const identifier = this.store.identifierCache.getOrCreateRecordIdentifier(resource);
return this.getRecordData(identifier);
};
Expand Down

0 comments on commit c8fc274

Please sign in to comment.