Skip to content

Commit

Permalink
Remove an outdated hack
Browse files Browse the repository at this point in the history
The mentioned issue has been fixed in ember-data 2.2.1 on Nov 25, 2015 (emberjs/data#3866 (comment)). The oldest version ember-local-storage currently supports is 2.12.
  • Loading branch information
CvX committed Feb 24, 2019
1 parent 77e2ac0 commit 7033351
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions addon/adapters/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,7 @@ export default JSONAPIAdapter.extend(ImportExportMixin, {

return records
.then(function(result) {
result = result.data[0];
// hack to fix https://github.com/emberjs/data/issues/3790
// and https://github.com/emberjs/data/pull/3866
try {
store.push({data: null});
return {data: result || null};
} catch(e) {
return {data: result || []};
}
return {data: result.data[0] || null};
});
},

Expand Down

0 comments on commit 7033351

Please sign in to comment.