mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-02 00:05:35 +01:00
Fix: Codeclimate issue
This commit is contained in:
parent
786265ad8a
commit
ff3de9757b
@ -100,6 +100,10 @@ MethodDetails.propTypes = {
|
||||
property: PropTypes.object
|
||||
}
|
||||
|
||||
const getSourceLink = (sources, sourceUrl) => {
|
||||
return sources && sources[0] ? `${sourceUrl}src/${sources[0].fileName}#L${sources[0].line}` : ''
|
||||
}
|
||||
|
||||
const PropertyWrapper = ({ property, sourceUrl, parentAnchor }) => {
|
||||
const { name, kindString, flags, signatures, sources, decorators } = property
|
||||
const { isPublic, isStatic } = flags
|
||||
@ -115,10 +119,7 @@ const PropertyWrapper = ({ property, sourceUrl, parentAnchor }) => {
|
||||
deprecatedSlug = deprecatedUse && slugify(deprecatedUse.replace('.', '-'))
|
||||
}
|
||||
|
||||
const sourceLink =
|
||||
sources && sources[0]
|
||||
? `${sourceUrl}src/${sources[0].fileName}#L${sources[0].line}`
|
||||
: ''
|
||||
const sourceLink = getSourceLink(sources, sourceUrl)
|
||||
|
||||
return (
|
||||
<div
|
||||
|
Loading…
Reference in New Issue
Block a user