-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misc cleanup #4813
misc cleanup #4813
Conversation
stefanpenner
commented
Feb 22, 2017
•
edited
Loading
edited
- avoid needly internalModel -> type conversion, when the information is already present on the internalModel
- make asserts more consistent (ES6 interpolation etc)
- rename trueModelName to normalizedModelName
addon/-private/system/store.js
Outdated
@@ -746,7 +746,7 @@ Store = Service.extend({ | |||
|
|||
let fetchedInternalModel = this._findEmptyInternalModel(internalModel, options); | |||
|
|||
return promiseRecord(fetchedInternalModel, "DS: Store#findRecord " + internalModel.typeKey + " with id: " + get(internalModel, 'id')); | |||
return promiseRecord(fetchedInternalModel, `DS: Store#findRecord ${internalModel.modeName} with id: ${internalModel.id}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modelName* not modeName
let pendingFetchItem = { | ||
internalModel, | ||
resolver, | ||
options | ||
}; | ||
|
||
let modelClass = internalModel.type; // TODO: is this needed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, this can be refactored to modelName
. If so, this._pendingFetch
should be refactored as well as we don't beed it to expecting modelClass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya likely later PR, i think the review gods will be sad with the size of this one.
77e4081
to
3aecffc
Compare
* avoid needly internalModel -> type conversion, when the information is already present on the internalModel * make asserts more consistent (ES6 interpolation etc) * rename trueModelName to normalizedModelName
3aecffc
to
d94aef5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM