Skip to content

Commit

Permalink
Use prototype comparison to check to see if adapters are the same typ…
Browse files Browse the repository at this point in the history
…e instead of direct comparison. This fixes issue where each model has their own declared model adapter like ember-cli now requires. References issue: #68
  • Loading branch information
Chris Rice committed Jul 2, 2015
1 parent b021f3f commit c34acd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion localstorage_adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@
* In this case, cart belongsTo customer and its id is present in the
* main payload. We find each of these records and add them to _embedded.
*/
if (relationEmbeddedId && foreignAdapter === adapter)
if (relationEmbeddedId && DS.LSAdapter.prototype.isPrototypeOf(adapter))
{
recordPromise = recordPromise.then(function(recordPayload) {
var promise;
Expand Down

0 comments on commit c34acd7

Please sign in to comment.