Skip to content

Commit

Permalink
Merge pull request #1 from TRIPTYK/fix-peek-or-fail-return-type
Browse files Browse the repository at this point in the history
fix peekOrFail return type
  • Loading branch information
AmauryD authored Nov 22, 2023
2 parents 9c5ee52 + 1dcfa3a commit bf24f40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ember-utils/src/services/extended-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ export default class ExtendedStoreService extends Service {
return record;
}

public peekOrFail<K extends keyof ModelRegistry>(recordType: K, id: string) {
public peekOrFail<K extends keyof ModelRegistry>(
recordType: K,
id: string,
): ModelRegistry[K] {
const record = this.store.peekRecord(recordType, id);
if (!record) {
throw new Error(
Expand Down

0 comments on commit bf24f40

Please sign in to comment.