Skip to content

Commit

Permalink
Merge pull request #769 from GreatWizard/patch-1
Browse files Browse the repository at this point in the history
fix: typo in map.ts error message
  • Loading branch information
NullVoxPopuli authored Feb 23, 2023
2 parents bbf5f37 + abaad4a commit 1623795
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/afraid-cherries-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ember-resources": patch
---

fix typo in map error message when checking if every datum is an object
2 changes: 1 addition & 1 deletion ember-resources/src/util/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export class TrackedArrayMap<Element = unknown, MappedTo = unknown>

modify([data]: Positional<Args<Element, MappedTo>>, { map }: Named<Args<Element, MappedTo>>) {
assert(
`Every entry in the data passed ta \`map\` must be an object.`,
`Every entry in the data passed to \`map\` must be an object.`,
data.every((datum) => typeof datum === 'object')
);
this._records = data as Array<Element & object>;
Expand Down

0 comments on commit 1623795

Please sign in to comment.