Skip to content

Commit

Permalink
address pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
erichaus committed May 6, 2020
1 parent 8d024ae commit 6cd0964
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,10 @@ Shoebox gives you great capabilities, but using it in the real app is pretty rou

One way to abstract the shoebox data storage mechanics is to move the logic into
the Application Adapter as shown below.

```
export default class ApplicationAdapter extends JSONAPIAdapter.extend(
...
// ...snip...
cacheKeyFor([, model, id]) {
return (model.modelName && id) ? `${model.modelName}-${id}` : 'default-store';
Expand All @@ -446,8 +447,8 @@ export default class ApplicationAdapter extends JSONAPIAdapter.extend(
result = await super.findRecord(...arguments);
}
// must deep-copy for clean serialization.
return JSON.parse(JSON.stringify(result));
// must deep-copy for clean serialization.
return JSON.parse(JSON.stringify(result));
}
}
```
Expand Down

0 comments on commit 6cd0964

Please sign in to comment.