Clean unrequired type assertion

This commit is contained in:
Amit Jakubowicz 2018-07-10 08:23:22 +02:00
parent 2e44e1af3d
commit 4d698cb75a

View file

@ -164,7 +164,7 @@ export default class Repository {
async getEvent(id: string, datastore ?: Datastore | DatastoreTransaction): Promise<CalendarEvent> {
const ds = (datastore || this.datastore)
const result = await ds.get(this.datastore.key(['Event', id]) as DatastoreKey)
const result = await ds.get(this.datastore.key(['Event', id]))
if (!result) {
return null