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:
parent
17e6540031
commit
18f0dd7040
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user