Last active
October 12, 2016 10:37
-
-
Save raido/90cf1c082135f15e8ca539a3efa968a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.store.query('model', { | |
param: 1 | |
}).then((records) => { | |
if (records.get('length') === 0) { | |
return new RSVP.reject(); | |
} | |
return records; | |
}).catch(() => { | |
// no records found | |
}).then((records) => { | |
// DO something with the records | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment