We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 21be151 commit 9d68217Copy full SHA for 9d68217
app/routes/index.js
@@ -5,7 +5,12 @@ export default Ember.Route.extend({
5
model() {
6
function addCrates(store, crates) {
7
for (var i = 0; i < crates.length; i++) {
8
- crates[i] = store.push(store.normalize('crate', crates[i]));
+ const crate = crates[i];
9
+ if (crate.versions == null) {
10
+ // passing `null` will return an empty versions array
11
+ delete crate.versions;
12
+ }
13
+ crates[i] = store.push(store.normalize('crate', crate));
14
}
15
16
0 commit comments