1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

shortened find()

This commit is contained in:
Sebastian Gerske 2018-11-21 16:38:48 +01:00
parent 17e6540031
commit 18f0dd7040

View File

@ -38,9 +38,7 @@ export default class DDO {
throw new Error("serviceDefinitionId not set")
}
const service: Service = this.service.find((s) => {
return s.serviceDefinitionId === serviceDefinitionId
})
const service: Service = this.service.find((s) => s.serviceDefinitionId === serviceDefinitionId)
return service
}
@ -51,9 +49,7 @@ export default class DDO {
throw new Error("serviceType not set")
}
const service: Service = this.service.find((s) => {
return s.type === serviceType
})
const service: Service = this.service.find((s) => s.type === serviceType)
return service
}